mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
work around stage1 limitations
This commit is contained in:
parent
8583e88db5
commit
7d4bc54277
@ -3074,22 +3074,24 @@ const CsuObjects = struct {
|
||||
|
||||
var result: CsuObjects = .{};
|
||||
|
||||
// Flatten crt cases.
|
||||
const mode: enum {
|
||||
const Mode = enum {
|
||||
dynamic_lib,
|
||||
dynamic_exe,
|
||||
dynamic_pie,
|
||||
static_exe,
|
||||
static_pie,
|
||||
} = switch (link_options.output_mode) {
|
||||
};
|
||||
|
||||
// Flatten crt cases.
|
||||
const mode: Mode = switch (link_options.output_mode) {
|
||||
.Obj => return CsuObjects{},
|
||||
.Lib => switch (link_options.link_mode) {
|
||||
.Dynamic => .dynamic_lib,
|
||||
.Static => return CsuObjects{},
|
||||
},
|
||||
.Exe => switch (link_options.link_mode) {
|
||||
.Dynamic => if (link_options.pie) .dynamic_pie else .dynamic_exe,
|
||||
.Static => if (link_options.pie) .static_pie else .static_exe,
|
||||
.Dynamic => if (link_options.pie) Mode.dynamic_pie else Mode.dynamic_exe,
|
||||
.Static => if (link_options.pie) Mode.static_pie else Mode.static_exe,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user