-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Closed
Copy link
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
Extracted from #14647.
Zig Version
0.11.0-dev.2148+b3af5d076
Steps to Reproduce and Observed Behavior
The test case from 4efeeaa passes.
In particular, test_exe.linkSystemLibrary("a"); // force linking liba.a as -la.
Expected Behavior
I expect -l to link dynamic libraries, and static libraries to be put on the command line as positional arguments. I don't want the linker to decide whether to link statically or dynamically. It's too late at that point. I want the frontend to decide whether a library is linked statically or dynamically.
There should never be any ambiguity. -l should always dynamically link, and positional arguments are already unambiguous.
Metadata
Metadata
Assignees
Labels
breakingImplementing this issue could cause existing code to no longer compile or have different behavior.Implementing this issue could cause existing code to no longer compile or have different behavior.bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.