mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 00:20:40 +03:00
Merge remote-tracking branch 'origin/ltsmaster'
This commit is contained in:
commit
0b2d7e7969
3 changed files with 7 additions and 3 deletions
|
@ -153,7 +153,11 @@ static int linkObjToBinaryGcc(bool sharedLib, bool fullyStatic) {
|
|||
// Don't push -l and -L switches using -Xlinker, but pass them indirectly
|
||||
// via GCC. This makes sure user-defined paths take precedence over
|
||||
// GCC's builtin LIBRARY_PATHs.
|
||||
if (!p[0] || !(p[0] == '-' && (p[1] == 'l' || p[1] == 'L'))) {
|
||||
// Options starting with -shared and -static are not handled by
|
||||
// the linker and must be passed to the driver.
|
||||
auto str = llvm::StringRef(p);
|
||||
if (!(str.startswith("-l") || str.startswith("-L") ||
|
||||
str.startswith("-shared") || str.startswith("-static"))) {
|
||||
args.push_back("-Xlinker");
|
||||
}
|
||||
args.push_back(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue