authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-06-16 20:51:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-06-17 16:38:59-07:00
loge798a3a7796892427ac4561839a35286108bbf6c
treef02d1ed73189a44fbdaf9622762a2fa0519c7b4a
parent5cd548e53081428d0e6b4a6b5a305317052c133a

compiler-rt: disable separate compilation units


2 files changed, 5 insertions(+), 1 deletions(-)

src/Compilation.zig+3-1
...@@ -2800,7 +2800,9 @@ pub fn performAllTheWork(...@@ -2800,7 +2800,9 @@ pub fn performAllTheWork(
2800 if (comp.job_queued_compiler_rt_lib) {2800 if (comp.job_queued_compiler_rt_lib) {
2801 comp.job_queued_compiler_rt_lib = false;2801 comp.job_queued_compiler_rt_lib = false;
28022802
2803 if (use_stage1) {2803 // I have disabled the multi-threaded compiler-rt for now until
2804 // the threading deadlock is resolved.
2805 if (use_stage1 or true) {
2804 // stage1 LLVM backend uses the global context and thus cannot be used in2806 // stage1 LLVM backend uses the global context and thus cannot be used in
2805 // a multi-threaded context.2807 // a multi-threaded context.
2806 buildCompilerRtOneShot(comp, .Lib, &comp.compiler_rt_lib);2808 buildCompilerRtOneShot(comp, .Lib, &comp.compiler_rt_lib);
src/compiler_rt.zig+2
...@@ -69,6 +69,7 @@ pub fn buildCompilerRtLib(comp: *Compilation, progress_node: *std.Progress.Node)...@@ -69,6 +69,7 @@ pub fn buildCompilerRtLib(comp: *Compilation, progress_node: *std.Progress.Node)
69 .main_pkg = null,69 .main_pkg = null,
70 .output_mode = .Lib,70 .output_mode = .Lib,
71 .link_mode = .Static,71 .link_mode = .Static,
72 .function_sections = true,
72 .thread_pool = comp.thread_pool,73 .thread_pool = comp.thread_pool,
73 .libc_installation = comp.bin_file.options.libc_installation,74 .libc_installation = comp.bin_file.options.libc_installation,
74 .emit_bin = emit_bin,75 .emit_bin = emit_bin,
...@@ -186,6 +187,7 @@ fn buildObject(comp: *Compilation, src_basename: []const u8, out: *?CRTFile) !vo...@@ -186,6 +187,7 @@ fn buildObject(comp: *Compilation, src_basename: []const u8, out: *?CRTFile) !vo
186 .emit_bin = emit_bin,187 .emit_bin = emit_bin,
187 .optimize_mode = comp.compilerRtOptMode(),188 .optimize_mode = comp.compilerRtOptMode(),
188 .link_mode = .Static,189 .link_mode = .Static,
190 .function_sections = true,
189 .want_sanitize_c = false,191 .want_sanitize_c = false,
190 .want_stack_check = false,192 .want_stack_check = false,
191 .want_red_zone = comp.bin_file.options.red_zone,193 .want_red_zone = comp.bin_file.options.red_zone,