aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.zig b/src/main.zig
index 76e49cde2e..5e406152d3 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -314,7 +314,7 @@ const usage_build_generic =
\\ -fno-soname (Linux) Disable emitting a SONAME
\\ -fLLD Force using LLD as the linker
\\ -fno-LLD Prevent using LLD as the linker
- \\ -fcompiler-rt Always including compiler-rt symbols in output
+ \\ -fcompiler-rt Always include compiler-rt symbols in output
\\ -fno-compiler-rt Prevent including compiler-rt symbols in output
\\ -rdynamic Add all symbols to the dynamic symbol table
\\ -rpath [path] Add directory to the runtime library search path
@@ -480,6 +480,7 @@ fn buildOutputType(
var want_sanitize_c: ?bool = null;
var want_stack_check: ?bool = null;
var want_valgrind: ?bool = null;
+ var want_compiler_rt: ?bool = null;
var rdynamic: bool = false;
var linker_script: ?[]const u8 = null;
var version_script: ?[]const u8 = null;
@@ -492,7 +493,6 @@ fn buildOutputType(
var test_evented_io = false;
var stack_size_override: ?u64 = null;
var image_base_override: ?u64 = null;
- var bundle_compiler_rt = false;
var use_llvm: ?bool = null;
var use_lld: ?bool = null;
var use_clang: ?bool = null;
@@ -797,8 +797,10 @@ fn buildOutputType(
if (i + 1 >= args.len) fatal("expected parameter after {}", .{arg});
i += 1;
override_lib_dir = args[i];
- } else if (mem.eql(u8, arg, "--bundle-compiler-rt")) {
- bundle_compiler_rt = true;
+ } else if (mem.eql(u8, arg, "-fcompiler-rt")) {
+ want_compiler_rt = true;
+ } else if (mem.eql(u8, arg, "-fno-compiler-rt")) {
+ want_compiler_rt = false;
} else if (mem.eql(u8, arg, "-feach-lib-rpath")) {
each_lib_rpath = true;
} else if (mem.eql(u8, arg, "-fno-each-lib-rpath")) {
@@ -1693,6 +1695,7 @@ fn buildOutputType(
.want_sanitize_c = want_sanitize_c,
.want_stack_check = want_stack_check,
.want_valgrind = want_valgrind,
+ .want_compiler_rt = want_compiler_rt,
.use_llvm = use_llvm,
.use_lld = use_lld,
.use_clang = use_clang,
@@ -1710,7 +1713,6 @@ fn buildOutputType(
.link_emit_relocs = link_emit_relocs,
.stack_size_override = stack_size_override,
.image_base_override = image_base_override,
- .bundle_compiler_rt = bundle_compiler_rt,
.strip = strip,
.single_threaded = single_threaded,
.function_sections = function_sections,