Skip to content

Commit b8d1f0b

Browse files
committed
Compilation: add missing link file options to cache manifest
Resolves: ziglang#23869
1 parent 08d534e commit b8d1f0b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/Compilation.zig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,6 +2758,13 @@ fn addNonIncrementalStuffToCacheManifest(
27582758
man.hash.addOptional(opts.allow_shlib_undefined);
27592759
man.hash.add(opts.bind_global_refs_locally);
27602760

2761+
const EntryTag = @typeInfo(link.File.OpenOptions.Entry).@"union".tag_type.?;
2762+
man.hash.add(@as(EntryTag, opts.entry));
2763+
switch (opts.entry) {
2764+
.default, .disabled, .enabled => {},
2765+
.named => |name| man.hash.addBytes(name),
2766+
}
2767+
27612768
// ELF specific stuff
27622769
man.hash.add(opts.z_nodelete);
27632770
man.hash.add(opts.z_notext);
@@ -2779,6 +2786,9 @@ fn addNonIncrementalStuffToCacheManifest(
27792786
man.hash.addOptional(opts.max_memory);
27802787
man.hash.addOptional(opts.global_base);
27812788
man.hash.addListOfBytes(opts.export_symbol_names);
2789+
man.hash.add(opts.import_symbols);
2790+
man.hash.add(opts.import_table);
2791+
man.hash.add(opts.export_table);
27822792

27832793
// Mach-O specific stuff
27842794
try link.File.MachO.hashAddFrameworks(man, opts.frameworks);
@@ -2789,6 +2799,9 @@ fn addNonIncrementalStuffToCacheManifest(
27892799
man.hash.add(opts.dead_strip_dylibs);
27902800
man.hash.add(opts.force_load_objc);
27912801
man.hash.add(opts.discard_local_symbols);
2802+
man.hash.addOptional(opts.compatibility_version);
2803+
man.hash.addOptionalBytes(opts.install_name);
2804+
man.hash.addOptional(opts.darwin_sdk_layout);
27922805

27932806
// COFF specific stuff
27942807
man.hash.addOptional(opts.subsystem);
@@ -2797,6 +2810,8 @@ fn addNonIncrementalStuffToCacheManifest(
27972810
man.hash.add(opts.dynamicbase);
27982811
man.hash.addOptional(opts.major_subsystem_version);
27992812
man.hash.addOptional(opts.minor_subsystem_version);
2813+
man.hash.addOptionalBytes(opts.pdb_source_path);
2814+
man.hash.addOptionalBytes(opts.module_definition_file);
28002815
}
28012816

28022817
fn emitOthers(comp: *Compilation) void {

0 commit comments

Comments
 (0)