-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Description
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
Zig fails to link against a dynamic library when it is passed by filename on the command-line, i.e. a command like
$ zig build-lib some-dir/libadd.dylib main.zig
fails with an error of the form
error: unknown file type for an object file
note: while parsing some-dir/libadd.dylib
However, it succeeds when instead using -L and -l flags as follows
$ zig build-lib -Lsome-dir -ladd main.zig
See aherrmann/rules_zig#274 for further details.
Note, this used to work with Zig 0.11.0. So, this is a regression.
Expected Behavior
The linking should succeed with both types of commands. For reference zig build-lib --help states:
Supported file types:
.zig Zig source code
...
.dylib Mach-O (macOS) dynamic library
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior