diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-11-30 16:40:25 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-11-30 16:40:25 -0700 |
| commit | 205af5b14828d64c10f5c67e05cebf32b882c646 (patch) | |
| tree | a76c48fca7b7458f41c4dca14f9ec9eb30325818 /lib | |
| parent | 51d7c14ce1bdadc4405474cfb3945581c198c741 (diff) | |
| parent | ff9798eb265b02d572ecbced675efcd7c763aea9 (diff) | |
| download | zig-205af5b14828d64c10f5c67e05cebf32b882c646.tar.gz zig-205af5b14828d64c10f5c67e05cebf32b882c646.zip | |
Merge branch 'alexnask-bundle_compiler_rt' into master
Closes #7013
Closes #6817
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/std/build.zig | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/std/build.zig b/lib/std/build.zig index 69af052e2a..c8439ca20a 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -1216,7 +1216,7 @@ pub const LibExeObjStep = struct { emit_bin: bool = true, emit_docs: bool = false, emit_h: bool = false, - bundle_compiler_rt: bool, + bundle_compiler_rt: ?bool = null, disable_stack_probing: bool, disable_sanitize_c: bool, rdynamic: bool, @@ -1395,7 +1395,6 @@ pub const LibExeObjStep = struct { .exec_cmd_args = null, .name_prefix = "", .filter = null, - .bundle_compiler_rt = false, .disable_stack_probing = false, .disable_sanitize_c = false, .rdynamic = false, @@ -2120,8 +2119,12 @@ pub const LibExeObjStep = struct { if (self.is_dynamic) { try zig_args.append("-dynamic"); } - if (self.bundle_compiler_rt) { - try zig_args.append("--bundle-compiler-rt"); + if (self.bundle_compiler_rt) |x| { + if (x) { + try zig_args.append("-fcompiler-rt"); + } else { + try zig_args.append("-fno-compiler-rt"); + } } if (self.disable_stack_probing) { try zig_args.append("-fno-stack-check"); |
