diff --git a/test/Macros/lit.local.cfg b/test/Macros/lit.local.cfg index fe1101a502530..45486fc495c8d 100644 --- a/test/Macros/lit.local.cfg +++ b/test/Macros/lit.local.cfg @@ -31,3 +31,4 @@ else: ) config.substitutions.append(('%c-flags', config.c_flags)) config.substitutions.append(('%exe-linker-flags', config.exe_linker_flags)) + config.substitutions.append(('%shared-linker-flags', config.shared_linker_flags)) diff --git a/test/Macros/macro_plugin_server_mod.swift b/test/Macros/macro_plugin_server_mod.swift index 97a96c44c6662..6d527dde90697 100644 --- a/test/Macros/macro_plugin_server_mod.swift +++ b/test/Macros/macro_plugin_server_mod.swift @@ -24,6 +24,7 @@ // RUN: %cmake-c-compiler \ // RUN: %c-flags -target %host_triple -isysroot %host_sdk \ +// RUN: %shared-linker-flags \ // RUN: -shared -o %t/plugins/libCrashOnLoad.dylib \ // RUN: %t/CrashOnLoad.c diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 4da78ee4d43ec..3656477b86fec 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -52,6 +52,7 @@ config.cmake_c_compiler = r'''@CMAKE_C_COMPILER@''' config.cmake_cxx_compiler = r'''@CMAKE_CXX_COMPILER@''' config.c_flags = r'''@CMAKE_C_FLAGS@''' config.exe_linker_flags = r'''@CMAKE_EXE_LINKER_FLAGS@''' +config.shared_linker_flags = r'''@CMAKE_SHARED_LINKER_FLAGS@''' # --- Darwin --- config.darwin_xcrun_toolchain = "@SWIFT_DARWIN_XCRUN_TOOLCHAIN@"