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.
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
-lto 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.
-lshould always dynamically link, and positional arguments are already unambiguous.