Extend -platformlib to Posix targets

This commit is contained in:
Martin Kinkelin 2020-08-14 17:35:33 +02:00
parent ccaccb8edd
commit 18ed3efe4d
5 changed files with 76 additions and 74 deletions

View file

@ -556,7 +556,14 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
}
}
addDefaultPlatformLibs();
const auto explicitPlatformLibs = getExplicitPlatformLibs();
if (explicitPlatformLibs.hasValue()) {
for (const auto &name : explicitPlatformLibs.getValue()) {
args.push_back("-l" + name);
}
} else {
addDefaultPlatformLibs();
}
addTargetFlags();
}