compiler-rt: disable separate compilation units

This commit is contained in:
Andrew Kelley 2022-06-16 20:51:15 -07:00
parent 5cd548e530
commit e798a3a779
2 changed files with 5 additions and 1 deletions

View File

@ -2800,7 +2800,9 @@ pub fn performAllTheWork(
if (comp.job_queued_compiler_rt_lib) {
comp.job_queued_compiler_rt_lib = false;
if (use_stage1) {
// I have disabled the multi-threaded compiler-rt for now until
// the threading deadlock is resolved.
if (use_stage1 or true) {
// stage1 LLVM backend uses the global context and thus cannot be used in
// a multi-threaded context.
buildCompilerRtOneShot(comp, .Lib, &comp.compiler_rt_lib);

View File

@ -69,6 +69,7 @@ pub fn buildCompilerRtLib(comp: *Compilation, progress_node: *std.Progress.Node)
.main_pkg = null,
.output_mode = .Lib,
.link_mode = .Static,
.function_sections = true,
.thread_pool = comp.thread_pool,
.libc_installation = comp.bin_file.options.libc_installation,
.emit_bin = emit_bin,
@ -186,6 +187,7 @@ fn buildObject(comp: *Compilation, src_basename: []const u8, out: *?CRTFile) !vo
.emit_bin = emit_bin,
.optimize_mode = comp.compilerRtOptMode(),
.link_mode = .Static,
.function_sections = true,
.want_sanitize_c = false,
.want_stack_check = false,
.want_red_zone = comp.bin_file.options.red_zone,