diff options
| author | kcbanner <kcbanner@gmail.com> | 2022-11-09 00:50:29 -0500 |
|---|---|---|
| committer | kcbanner <kcbanner@gmail.com> | 2023-01-04 21:45:06 -0500 |
| commit | b97a68c529b5db15705f4d542d8ead616d27c880 (patch) | |
| tree | 4a88814249684640687fbde316fe0ad0bf9256d6 /src/main.zig | |
| parent | 0471eea0e2cac49946449efe4698d5ac18c0dc0d (diff) | |
| download | zig-b97a68c529b5db15705f4d542d8ead616d27c880.tar.gz zig-b97a68c529b5db15705f4d542d8ead616d27c880.zip | |
windows: supporting changes for boostrapping via msvc
- add support for passing through .def files to the linker,
required for building libLTO.dll in LLVM
- fixup libcpp linking conditionals
- add option to skip linking zstd for use in bootstrapping (when
building against an LLVM with LLVM_ENABLE_ZSTD=OFF)
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig index 421164de1c..d718f299c7 100644 --- a/src/main.zig +++ b/src/main.zig @@ -742,6 +742,7 @@ fn buildOutputType( var linker_nxcompat = false; var linker_dynamicbase = false; var linker_optimization: ?u8 = null; + var linker_module_definition_file: ?[]const u8 = null; var test_evented_io = false; var test_no_exec = false; var entry: ?[]const u8 = null; @@ -1404,7 +1405,7 @@ fn buildOutputType( root_src_file = arg; } }, - .unknown => { + .def, .unknown => { fatal("unrecognized file extension of parameter '{s}'", .{arg}); }, } @@ -1478,6 +1479,9 @@ fn buildOutputType( .must_link = must_link, }); }, + .def => { + linker_module_definition_file = it.only_arg; + }, .zig => { if (root_src_file) |other| { fatal("found another zig file '{s}' after root source file '{s}'", .{ it.only_arg, other }); @@ -3015,6 +3019,7 @@ fn buildOutputType( .linker_dynamicbase = linker_dynamicbase, .linker_optimization = linker_optimization, .linker_compress_debug_sections = linker_compress_debug_sections, + .linker_module_definition_file = linker_module_definition_file, .major_subsystem_version = major_subsystem_version, .minor_subsystem_version = minor_subsystem_version, .link_eh_frame_hdr = link_eh_frame_hdr, |
