File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1618,6 +1618,18 @@ function Build-CMakeProject {
16181618 } else {
16191619 @ (" /DEBUG" )
16201620 }
1621+
1622+ # The linker flags are shared across every language, and `/IGNORE:longsections` is an
1623+ # `lld-link.exe` argument, not `link.exe`, so this can only be enabled when we use
1624+ # `lld-link.exe` for linking.
1625+ # TODO: Investigate supporting fission with PE/COFF, this should avoid this warning.
1626+ if ($SwiftDebugFormat -eq " dwarf" ) {
1627+ if ($UseGNUDriver ) {
1628+ $LinkerFlags += @ (" -Xlinker" , " /IGNORE:longsections" )
1629+ } elseif (-not $UseMSVCCompilers.Contains (" C" ) -and -not $UseMSVCCompilers.Contains (" CXX" )) {
1630+ $LinkerFlags += @ (" /IGNORE:longsections" )
1631+ }
1632+ }
16211633 }
16221634 }
16231635
You can’t perform that action at this time.
0 commit comments