@deprecated: add build system support
This commit is contained in:
@@ -25,6 +25,7 @@ stack_check: ?bool,
|
||||
sanitize_c: ?bool,
|
||||
sanitize_thread: ?bool,
|
||||
fuzz: ?bool,
|
||||
allow_deprecated: ?bool,
|
||||
code_model: std.builtin.CodeModel,
|
||||
valgrind: ?bool,
|
||||
pic: ?bool,
|
||||
@@ -284,6 +285,7 @@ pub fn init(
|
||||
.owner = owner,
|
||||
.root_source_file = if (options.root_source_file) |lp| lp.dupe(owner) else null,
|
||||
.import_table = .{},
|
||||
.allow_deprecated = owner.graph.allow_deprecated orelse !owner.is_root,
|
||||
.resolved_target = options.target,
|
||||
.optimize = options.optimize,
|
||||
.link_libc = options.link_libc,
|
||||
@@ -557,6 +559,10 @@ pub fn appendZigProcessFlags(
|
||||
try addFlag(zig_args, m.pic, "-fPIC", "-fno-PIC");
|
||||
try addFlag(zig_args, m.red_zone, "-mred-zone", "-mno-red-zone");
|
||||
|
||||
if (m.root_source_file != null) {
|
||||
try addFlag(zig_args, m.allow_deprecated, "-fallow-deprecated", "-fno-allow-deprecated");
|
||||
}
|
||||
|
||||
if (m.dwarf_format) |dwarf_format| {
|
||||
try zig_args.append(switch (dwarf_format) {
|
||||
.@"32" => "-gdwarf32",
|
||||
|
||||
Reference in New Issue
Block a user