| author | |
| committer | |
| log | ba7cd8121d5a52beb1e9844a784ec7a439ee6cfd |
| tree | a00b423510a61b56572b3451100d3a0cf762b9e4 |
| parent | fff8eff2bd0cc36b192d0ab43b522161227c3c2d |
3 files changed, 17 insertions(+), 0 deletions(-)
lib/compiler/build_runner.zig+6| ... | ... | @@ -260,6 +260,10 @@ pub fn main() !void { |
| 260 | 260 | graph.incremental = true; |
| 261 | 261 | } else if (mem.eql(u8, arg, "-fno-incremental")) { |
| 262 | 262 | graph.incremental = false; |
| 263 | } else if (mem.eql(u8, arg, "-fallow-deprecated")) { | |
| 264 | graph.allow_deprecated = true; | |
| 265 | } else if (mem.eql(u8, arg, "-fno-allow-deprecated")) { | |
| 266 | graph.allow_deprecated = false; | |
| 263 | 267 | } else if (mem.eql(u8, arg, "-fwine")) { |
| 264 | 268 | builder.enable_wine = true; |
| 265 | 269 | } else if (mem.eql(u8, arg, "-fno-wine")) { |
| ... | ... | @@ -1283,6 +1287,8 @@ fn usage(b: *std.Build, out_stream: anytype) !void { |
| 1283 | 1287 | \\ new Omit cached steps |
| 1284 | 1288 | \\ failures (Default) Only print failed steps |
| 1285 | 1289 | \\ none Do not print the build summary |
| 1290 | \\ -fallow-deprecated Allow usage of deprecated code for the entire build graph | |
| 1291 | \\ -fno-allow-deprecated Disallow usage of deprecated code for the entire build graph | |
| 1286 | 1292 | \\ -j<N> Limit concurrent jobs (default is to use all CPU cores) |
| 1287 | 1293 | \\ --maxrss <bytes> Limit memory usage (default is to use available memory) |
| 1288 | 1294 | \\ --skip-oom-steps Instead of failing, skip steps that would exceed --maxrss |
lib/std/Build.zig+5| ... | ... | @@ -94,6 +94,9 @@ available_deps: AvailableDeps, |
| 94 | 94 | |
| 95 | 95 | release_mode: ReleaseMode, |
| 96 | 96 | |
| 97 | // True only for the top-level builder. | |
| 98 | is_root: bool = false, | |
| 99 | ||
| 97 | 100 | pub const ReleaseMode = enum { |
| 98 | 101 | off, |
| 99 | 102 | any, |
| ... | ... | @@ -118,6 +121,7 @@ pub const Graph = struct { |
| 118 | 121 | /// Information about the native target. Computed before build() is invoked. |
| 119 | 122 | host: ResolvedTarget, |
| 120 | 123 | incremental: ?bool = null, |
| 124 | allow_deprecated: ?bool = null, | |
| 121 | 125 | random_seed: u32 = 0, |
| 122 | 126 | dependency_cache: InitializedDepMap = .empty, |
| 123 | 127 | allow_so_scripts: ?bool = null, |
| ... | ... | @@ -304,6 +308,7 @@ pub fn create( |
| 304 | 308 | .pkg_hash = "", |
| 305 | 309 | .available_deps = available_deps, |
| 306 | 310 | .release_mode = .off, |
| 311 | .is_root = true, | |
| 307 | 312 | }; |
| 308 | 313 | try b.top_level_steps.put(arena, b.install_tls.step.name, &b.install_tls); |
| 309 | 314 | try b.top_level_steps.put(arena, b.uninstall_tls.step.name, &b.uninstall_tls); |
lib/std/Build/Module.zig+6| ... | ... | @@ -25,6 +25,7 @@ stack_check: ?bool, |
| 25 | 25 | sanitize_c: ?bool, |
| 26 | 26 | sanitize_thread: ?bool, |
| 27 | 27 | fuzz: ?bool, |
| 28 | allow_deprecated: ?bool, | |
| 28 | 29 | code_model: std.builtin.CodeModel, |
| 29 | 30 | valgrind: ?bool, |
| 30 | 31 | pic: ?bool, |
| ... | ... | @@ -284,6 +285,7 @@ pub fn init( |
| 284 | 285 | .owner = owner, |
| 285 | 286 | .root_source_file = if (options.root_source_file) |lp| lp.dupe(owner) else null, |
| 286 | 287 | .import_table = .{}, |
| 288 | .allow_deprecated = owner.graph.allow_deprecated orelse !owner.is_root, | |
| 287 | 289 | .resolved_target = options.target, |
| 288 | 290 | .optimize = options.optimize, |
| 289 | 291 | .link_libc = options.link_libc, |
| ... | ... | @@ -557,6 +559,10 @@ pub fn appendZigProcessFlags( |
| 557 | 559 | try addFlag(zig_args, m.pic, "-fPIC", "-fno-PIC"); |
| 558 | 560 | try addFlag(zig_args, m.red_zone, "-mred-zone", "-mno-red-zone"); |
| 559 | 561 | |
| 562 | if (m.root_source_file != null) { | |
| 563 | try addFlag(zig_args, m.allow_deprecated, "-fallow-deprecated", "-fno-allow-deprecated"); | |
| 564 | } | |
| 565 | ||
| 560 | 566 | if (m.dwarf_format) |dwarf_format| { |
| 561 | 567 | try zig_args.append(switch (dwarf_format) { |
| 562 | 568 | .@"32" => "-gdwarf32", |