diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-12-24 18:30:38 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-01-01 17:51:21 -0700 |
| commit | 9141e1a29c8e1b3334a1ea3cdf85fe6df9cac2b4 (patch) | |
| tree | d9f88a1726c4de8d5b5c562ab741c71505a0f611 /src/Compilation.zig | |
| parent | e12e29630664a78a32103d56175162381443b574 (diff) | |
| download | zig-9141e1a29c8e1b3334a1ea3cdf85fe6df9cac2b4.tar.gz zig-9141e1a29c8e1b3334a1ea3cdf85fe6df9cac2b4.zip | |
CLI: fix logic for sending output file path
via the compiler protocol
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f825d8c930..c248685601 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1198,16 +1198,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const use_llvm = options.config.use_llvm; - // TODO: once we support incremental compilation for the LLVM backend via - // saving the LLVM module into a bitcode file and restoring it, along with - // compiler state, the second clause here can be removed so that incremental - // cache mode is used for LLVM backend too. We need some fuzz testing before - // that can be enabled. - const cache_mode = if ((use_llvm or !have_zcu) and !options.disable_lld_caching) - CacheMode.whole - else - options.cache_mode; - const any_unwind_tables = options.config.any_unwind_tables; const link_eh_frame_hdr = options.link_eh_frame_hdr or any_unwind_tables; @@ -1560,7 +1550,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { .compatibility_version = options.compatibility_version, .each_lib_rpath = each_lib_rpath, .build_id = build_id, - .disable_lld_caching = options.disable_lld_caching or cache_mode == .whole, + .disable_lld_caching = options.disable_lld_caching or options.cache_mode == .whole, .subsystem = options.subsystem, .hash_style = options.hash_style, .enable_link_snapshots = options.enable_link_snapshots, @@ -1576,7 +1566,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { .entry_addr = null, // CLI does not expose this option (yet?) }; - switch (cache_mode) { + switch (options.cache_mode) { .incremental => { // Options that are specific to zig source files, that cannot be // modified between incremental updates. |
