Skip to content

Commit 53c70df

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 53c70df

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Runtimes/Core/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ add_compile_options(
172172
add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
173173

174174
add_compile_options(
175+
"$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>"
175176
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
176177
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-runtime-compatibility-version none>"
177178
"$<$<COMPILE_LANGUAGE:Swift>:-disable-autolinking-runtime-compatibility-dynamic-replacements>"

0 commit comments

Comments
 (0)