File tree Expand file tree Collapse file tree 9 files changed +18
-8
lines changed Expand file tree Collapse file tree 9 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ add_compile_options(
181181# We cannot selectively filter the linker warnings as we do not use the MSVC
182182# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
183183# a compromise, treat all linker warnings as errors.
184- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
184+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
185185
186186add_compile_options (
187187 $<$<COMPILE_LANGUAGE:Swift>:-explicit-module-build >
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ include(ExperimentalFeatures)
9393# We cannot selectively filter the linker warnings as we do not use the MSVC
9494# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
9595# a compromise, treat all linker warnings as errors.
96- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
96+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
9797
9898include (ExperimentalFeatures)
9999
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ add_compile_options(
8787# a compromise, treat all linker warnings as errors.
8888# FIXME(#83444) - enable this once we fix DLL storage for
8989# `_fatalErrorForwardModeDifferentiationDisabled`
90- # add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX,/IGNORE:longsections >)
90+ # add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
9191
9292if (SwiftDifferentiation_ENABLE_VECTOR_TYPES)
9393 gyb_expand(SIMDDifferentiation.swift.gyb SIMDDifferentiation.swift)
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ add_compile_options(
9797# We cannot selectively filter the linker warnings as we do not use the MSVC
9898# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
9999# a compromise, treat all linker warnings as errors.
100- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
100+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
101101
102102add_library (swiftDistributed
103103 DistributedActor.cpp
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ add_compile_options(
8282# We cannot selectively filter the linker warnings as we do not use the MSVC
8383# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
8484# a compromise, treat all linker warnings as errors.
85- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
85+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
8686
8787add_library (swiftObservation
8888 Sources /Observation/Locking.swift
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ add_compile_options(
6464# We cannot selectively filter the linker warnings as we do not use the MSVC
6565# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
6666# a compromise, treat all linker warnings as errors.
67- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
67+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
6868
6969add_subdirectory (_RegexParser)
7070add_subdirectory (_StringProcessing)
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ add_compile_options(
100100# We cannot selectively filter the linker warnings as we do not use the MSVC
101101# frontned and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
102102# a compromise, treat all linker warnings as errors.
103- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
103+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
104104
105105gyb_expand(Atomics/AtomicIntegers.swift.gyb Atomics/AtomicIntegers.swift)
106106gyb_expand(Atomics/AtomicStorage.swift.gyb Atomics/AtomicStorage.swift)
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ add_compile_options(
7676# We cannot selectively filter the linker warnings as we do not use the MSVC
7777# frontend and `clang-cl` (and `clang`) currently do not support `/WX:nnnn`. As
7878# a compromise, treat all linker warnings as errors.
79- add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX,/ IGNORE :longsections >)
79+ add_link_options ($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
8080
8181add_library (swift_Volatile
8282 Volatile.swift)
Original file line number Diff line number Diff line change @@ -1608,6 +1608,16 @@ function Build-CMakeProject {
16081608 } else {
16091609 @ (" /DEBUG" )
16101610 }
1611+
1612+ # 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`.
1615+ # TODO: Investigate supporting fission with PE/COFF, this should avoid this warning.
1616+ if ($SwiftDebugFormat -eq " dwarf" ) {
1617+ if ($UseGNUDriver ) {
1618+ $LinkerFlags += @ (" -Xlinker" , " /IGNORE:longsections" )
1619+ }
1620+ }
16111621 }
16121622 }
16131623
You can’t perform that action at this time.
0 commit comments