-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-windowsMicrosoft WindowsMicrosoft Windows
Milestone
Description
Zig Version
0.15.0-dev.1495+14f11377c
Steps to Reproduce and Observed Behavior
- Build a Zig compiler for Windows without
-Denable-llvm - Create a hello world file with a main that calls
std.debug.print zig build-exe hello.zig -fno-llvm -fno-lld -target x86_64-windows-msvc
error: unable to generate DLL import .lib file for kernel32: ZigCompilerNotBuiltWithLLVMExtensions
Relevant code:
Lines 5173 to 5185 in 14f1137
| .windows_import_lib => |index| { | |
| const named_frame = tracy.namedFrame("windows_import_lib"); | |
| defer named_frame.end(); | |
| const link_lib = comp.windows_libs.keys()[index]; | |
| mingw.buildImportLib(comp, link_lib) catch |err| { | |
| // TODO Surface more error details. | |
| comp.lockAndSetMiscFailure( | |
| .windows_import_lib, | |
| "unable to generate DLL import .lib file for {s}: {s}", | |
| .{ link_lib, @errorName(err) }, | |
| ); | |
| }; |
Expected Behavior
When targeting MSVC, the .lib files should be gotten from the MSVC lib directories rather than generated from the MinGW .def files. That is, this particular error should be impossible when targeting MSVC.
Note that this is not super relevant right now, will become more relevant once progress on #17751 and #17807 is made
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavioros-windowsMicrosoft WindowsMicrosoft Windows