diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-13 08:24:21 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2021-05-13 08:24:21 +0200 |
| commit | 1aee896cae0747263e607de125a93023b5a9b320 (patch) | |
| tree | 49841fe55b55de0058176b025ec015ba990c1b61 /src/Compilation.zig | |
| parent | 6c3050e3c3eee19a9de2c912dc653062e5597b67 (diff) | |
| parent | 4b59f564344598b4d1f1a51839a4dc5cbf357012 (diff) | |
| download | zig-1aee896cae0747263e607de125a93023b5a9b320.tar.gz zig-1aee896cae0747263e607de125a93023b5a9b320.zip | |
Merge branch 'master' into streamline-stage2-build-script
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 71df776855..b14e598f71 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2260,23 +2260,7 @@ fn updateCObject(comp: *Compilation, c_object: *CObject, c_comp_progress_node: * man.hash.add(comp.clang_preprocessor_mode); - _ = try man.addFile(c_object.src.src_path, null); - { - // Hash the extra flags, with special care to call addFile for file parameters. - // TODO this logic can likely be improved by utilizing clang_options_data.zig. - const file_args = [_][]const u8{"-include"}; - var arg_i: usize = 0; - while (arg_i < c_object.src.extra_flags.len) : (arg_i += 1) { - const arg = c_object.src.extra_flags[arg_i]; - man.hash.addBytes(arg); - for (file_args) |file_arg| { - if (mem.eql(u8, file_arg, arg) and arg_i + 1 < c_object.src.extra_flags.len) { - arg_i += 1; - _ = try man.addFile(c_object.src.extra_flags[arg_i], null); - } - } - } - } + try man.hashCSource(c_object.src); { const is_collision = blk: { @@ -3039,7 +3023,6 @@ fn wantBuildLibUnwindFromSource(comp: *Compilation) bool { .Exe => true, }; return comp.bin_file.options.link_libc and is_exe_or_dyn_lib and - comp.bin_file.options.libc_installation == null and target_util.libcNeedsLibUnwind(comp.getTarget()); } |
