diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-06 02:52:25 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-07-19 23:38:40 -0400 |
| commit | d195173ba2c06b56c1bf5554ebf0736795798c91 (patch) | |
| tree | e358fa6f170400ce6a07ba00a032548a4f1263e8 /src/Compilation.zig | |
| parent | 996eb01746498e0ec5e162ed40d1f3c913891150 (diff) | |
| download | zig-d195173ba2c06b56c1bf5554ebf0736795798c91.tar.gz zig-d195173ba2c06b56c1bf5554ebf0736795798c91.zip | |
llvm: start tracking more things without relying on the llvm api
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index eb4b67933d..3a95f4831a 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -538,6 +538,7 @@ pub const InitOptions = struct { want_lto: ?bool = null, want_unwind_tables: ?bool = null, use_llvm: ?bool = null, + use_lib_llvm: ?bool = null, use_lld: ?bool = null, use_clang: ?bool = null, single_threaded: ?bool = null, @@ -753,7 +754,8 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const root_name = try arena.dupeZ(u8, options.root_name); // Make a decision on whether to use LLVM or our own backend. - const use_llvm = build_options.have_llvm and blk: { + const use_lib_llvm = options.use_lib_llvm orelse build_options.have_llvm; + const use_llvm = blk: { if (options.use_llvm) |explicit| break :blk explicit; @@ -1161,6 +1163,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { hash.add(valgrind); hash.add(single_threaded); hash.add(use_llvm); + hash.add(use_lib_llvm); hash.add(dll_export_fns); hash.add(options.is_test); hash.add(options.test_evented_io); @@ -1444,6 +1447,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { .optimize_mode = options.optimize_mode, .use_lld = use_lld, .use_llvm = use_llvm, + .use_lib_llvm = use_lib_llvm, .link_libc = link_libc, .link_libcpp = link_libcpp, .link_libunwind = link_libunwind, |
