Skip to content

Commit 854a250

Browse files
committed
Disable longsections warning in more cases
1 parent d080e2f commit 854a250

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

utils/build.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,12 +1610,14 @@ function Build-CMakeProject {
16101610
}
16111611

16121612
# The linker flags are shared across every language, and `/IGNORE:longsections` is an
1613-
# `lld-link.exe` argument, not `link.exe`, so this can only be enabled with the GNU
1614-
# driver, which guarantees we are using `lld-link.exe`.
1613+
# `lld-link.exe` argument, not `link.exe`, so this can only be enabled when we use
1614+
# `lld-link.exe` for linking.
16151615
# TODO: Investigate supporting fission with PE/COFF, this should avoid this warning.
16161616
if ($SwiftDebugFormat -eq "dwarf") {
16171617
if ($UseGNUDriver) {
16181618
$LinkerFlags += @("-Xlinker", "/IGNORE:longsections")
1619+
} elseif (-not $UseMSVCCompilers.Contains("C") -and -not $UseMSVCCompilers.Contains("CXX")) {
1620+
$LinkerFlags += @("/IGNORE:longsections")
16191621
}
16201622
}
16211623
}

0 commit comments

Comments
 (0)