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.
This commit is contained in:
Saleem Abdulrasool
2025-02-17 12:55:14 -08:00
parent 07b8f0ab32
commit 53c70df378

View File

@@ -172,6 +172,7 @@ add_compile_options(
add_link_options($<$<PLATFORM_ID:Windows>:LINKER:/WX>)
add_compile_options(
"$<$<COMPILE_LANGUAGE:Swift>:-nostdlibimport>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-library-level api>"
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-runtime-compatibility-version none>"
"$<$<COMPILE_LANGUAGE:Swift>:-disable-autolinking-runtime-compatibility-dynamic-replacements>"