Skip to content

Commit aa47859

Browse files
committed
Runtimes: add -nostdlibimport to the runtime build
If the compiler being used to build the runtime is from a complete toolchain, we may inadvertently pick up runtime from the previous build rather than the just built Swift Core library. Pass `-nostdlibimport` to ensure that we do not search the default search paths when building and use the locally built swiftCore.
1 parent 07b8f0a commit aa47859

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Runtimes/Core/Concurrency/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ target_compile_definitions(swift_Concurrency PRIVATE
9090
$<$<COMPILE_LANGUAGE:C,CXX>:-D__STDC_WANT_LIB_EXT1__=1>)
9191
target_compile_options(swift_Concurrency PRIVATE
9292
$<$<COMPILE_LANGUAGE:Swift>:-parse-stdlib>
93+
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
9394
# NOTE: do not remove until `IsolatedAny` is on by default in all supported
9495
# compilers.
9596
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-enable-experimental-feature IsolatedAny>"

Runtimes/Core/SwiftOnoneSupport/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ endif()
1111

1212
target_compile_options(swiftSwiftOnoneSupport PRIVATE
1313
$<$<COMPILE_LANGUAGE:Swift>:-parse-stdlib>
14+
$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>
1415
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xllvm -sil-inline-generics=false>"
1516

1617
# We have to disable validation of TBD files, because this module is

0 commit comments

Comments
 (0)