From 53c70df378181166243db436085ad9b076297cdb Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Mon, 17 Feb 2025 12:55:14 -0800 Subject: [PATCH] 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. --- Runtimes/Core/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Runtimes/Core/CMakeLists.txt b/Runtimes/Core/CMakeLists.txt index 0b376b3fb83ef..500dd4324d10a 100644 --- a/Runtimes/Core/CMakeLists.txt +++ b/Runtimes/Core/CMakeLists.txt @@ -172,6 +172,7 @@ add_compile_options( add_link_options($<$:LINKER:/WX>) add_compile_options( + "$<$:-nostdlibimport>" "$<$:SHELL:-library-level api>" "$<$:SHELL:-runtime-compatibility-version none>" "$<$:-disable-autolinking-runtime-compatibility-dynamic-replacements>"