aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-10-09 16:58:23 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-10-10 11:17:29 -0700
commit6e0904504155d3cba80955c108116170fd739aec (patch)
tree478d4c606d36f4b77405fe10ddf678de1f784862 /src/Compilation.zig
parent2ca7cc46c41dc5fe91fe385df4f3330634bd88f3 (diff)
downloadzig-6e0904504155d3cba80955c108116170fd739aec.tar.gz
zig-6e0904504155d3cba80955c108116170fd739aec.zip
compiler_rt: no need to put it in a static library
It's simpler to link against compiler_rt.o directly.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index cd4c6ea11b..4e43c7fccb 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -112,7 +112,6 @@ unwind_tables: bool,
test_evented_io: bool,
debug_compiler_runtime_libs: bool,
debug_compile_errors: bool,
-job_queued_compiler_rt_lib: bool = false,
job_queued_compiler_rt_obj: bool = false,
alloc_failure_occurred: bool = false,
formatted_panics: bool = false,
@@ -158,9 +157,6 @@ libssp_static_lib: ?CRTFile = null,
/// Populated when we build the libc static library. A Job to build this is placed in the queue
/// and resolved before calling linker.flush().
libc_static_lib: ?CRTFile = null,
-/// Populated when we build the libcompiler_rt static library. A Job to build this is indicated
-/// by setting `job_queued_compiler_rt_lib` and resolved before calling linker.flush().
-compiler_rt_lib: ?CRTFile = null,
/// Populated when we build the compiler_rt_obj object. A Job to build this is indicated
/// by setting `job_queued_compiler_rt_obj` and resolved before calling linker.flush().
compiler_rt_obj: ?CRTFile = null,
@@ -1877,13 +1873,8 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
}
if (comp.bin_file.options.include_compiler_rt and capable_of_building_compiler_rt) {
- if (is_exe_or_dyn_lib) {
- log.debug("queuing a job to build compiler_rt_lib", .{});
- comp.job_queued_compiler_rt_lib = true;
- } else if (options.output_mode != .Obj) {
+ if (is_exe_or_dyn_lib or options.output_mode != .Obj) {
log.debug("queuing a job to build compiler_rt_obj", .{});
- // In this case we are making a static library, so we ask
- // for a compiler-rt object to put in it.
comp.job_queued_compiler_rt_obj = true;
}
}
@@ -1938,9 +1929,6 @@ pub fn destroy(self: *Compilation) void {
if (self.libcxxabi_static_lib) |*crt_file| {
crt_file.deinit(gpa);
}
- if (self.compiler_rt_lib) |*crt_file| {
- crt_file.deinit(gpa);
- }
if (self.compiler_rt_obj) |*crt_file| {
crt_file.deinit(gpa);
}
@@ -3407,11 +3395,6 @@ pub fn performAllTheWork(
break;
}
- if (comp.job_queued_compiler_rt_lib) {
- comp.job_queued_compiler_rt_lib = false;
- buildCompilerRtOneShot(comp, .Lib, &comp.compiler_rt_lib, main_progress_node);
- }
-
if (comp.job_queued_compiler_rt_obj) {
comp.job_queued_compiler_rt_obj = false;
buildCompilerRtOneShot(comp, .Obj, &comp.compiler_rt_obj, main_progress_node);