mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Autolink] Autolinking on COFF for Cygwin/MinGW
Cygwin and MinGW should use the autolink feature in the sameway of Linux due to the linker's limit. Now swift-autolink-extract recognizes the COFF format file for Cygwin/MinGW.
This commit is contained in:
@@ -1316,7 +1316,8 @@ void Driver::buildActions(const ToolChain &TC,
|
||||
if (OI.shouldLink() && !AllLinkerInputs.empty()) {
|
||||
auto *LinkAction = new LinkJobAction(AllLinkerInputs, OI.LinkAction);
|
||||
|
||||
if (TC.getTriple().getObjectFormat() == llvm::Triple::ELF) {
|
||||
if (TC.getTriple().getObjectFormat() == llvm::Triple::ELF ||
|
||||
TC.getTriple().isOSCygMing()) {
|
||||
// On ELF platforms there's no built in autolinking mechanism, so we
|
||||
// pull the info we need from the .o files directly and pass them as an
|
||||
// argument input file to the linker.
|
||||
|
||||
Reference in New Issue
Block a user