diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index 48dd233462ab3..f6d450c0bca59 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -148,3 +148,5 @@ if (LIBCXX_CONFIGURE_IDE) EXCLUDE_FROM_ALL ON ) endif() + +message(WARNING "CMAKE_CXX_FLAGS_INIT='${CMAKE_CXX_FLAGS_INIT}', CMAKE_EXE_LINKER_FLAGS_INIT='${CMAKE_EXE_LINKER_FLAGS_INIT}'") diff --git a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in index b471c02709c06..374ad38247f9f 100644 --- a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in +++ b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in @@ -45,10 +45,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- ' diff --git a/libcxx/test/configs/apple-libc++-shared.cfg.in b/libcxx/test/configs/apple-libc++-shared.cfg.in index af1926e3859b9..0c664ad2cf65f 100644 --- a/libcxx/test/configs/apple-libc++-shared.cfg.in +++ b/libcxx/test/configs/apple-libc++-shared.cfg.in @@ -13,10 +13,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib} -- ' diff --git a/libcxx/test/configs/ibm-libc++-shared.cfg.in b/libcxx/test/configs/ibm-libc++-shared.cfg.in index 7881556603cfa..233ac0a589d0c 100644 --- a/libcxx/test/configs/ibm-libc++-shared.cfg.in +++ b/libcxx/test/configs/ibm-libc++-shared.cfg.in @@ -6,10 +6,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '-pthread')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi -latomic -Wl,-bbigtoc' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi -latomic -Wl,-bbigtoc' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env LIBPATH=%{lib} -- ' diff --git a/libcxx/test/configs/llvm-libc++-mingw.cfg.in b/libcxx/test/configs/llvm-libc++-mingw.cfg.in index eb77f1142db61..dea3620be4769 100644 --- a/libcxx/test/configs/llvm-libc++-mingw.cfg.in +++ b/libcxx/test/configs/llvm-libc++-mingw.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in index 50d28eb67c77b..0b2348f80f26b 100644 --- a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in +++ b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include + '@CMAKE_CXX_FLAGS_INIT@ -fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include )) config.substitutions.append(('%{link_flags}', - '-nostdlib -L %{lib} -lc++ -l' + config.cxx_lib + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib -L %{lib} -lc++ -l' + config.cxx_lib )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in index a75e90b198896..512926e3307a6 100644 --- a/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in +++ b/libcxx/test/configs/llvm-libc++-shared-gcc.cfg.in @@ -6,10 +6,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '-pthread')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -lm' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -lm' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in index 4c88af3dbb6eb..acf568d190f9f 100644 --- a/libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in +++ b/libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in @@ -6,10 +6,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -D_HAS_EXCEPTIONS=0' + config.dbg_include + '@CMAKE_CXX_FLAGS_INIT@ -fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -D_HAS_EXCEPTIONS=0' + config.dbg_include )) config.substitutions.append(('%{link_flags}', - '-nostdlib -L %{lib} -lc++ -l' + config.cxx_lib + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib -L %{lib} -lc++ -l' + config.cxx_lib )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxx/test/configs/llvm-libc++-shared.cfg.in b/libcxx/test/configs/llvm-libc++-shared.cfg.in index 143b3b3feae11..82e7129d8f166 100644 --- a/libcxx/test/configs/llvm-libc++-shared.cfg.in +++ b/libcxx/test/configs/llvm-libc++-shared.cfg.in @@ -7,10 +7,10 @@ config.substitutions.append(('%{flags}', '-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '') )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in index 4baaad765a92d..9b486318d1803 100644 --- a/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in +++ b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include + '@CMAKE_CXX_FLAGS_INIT@ -fms-runtime-lib=' + config.fms_runtime_lib + ' -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config.dbg_include )) config.substitutions.append(('%{link_flags}', - '-nostdlib -L %{lib} -llibc++ -l' + config.cxx_lib + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib -L %{lib} -llibc++ -l' + config.cxx_lib )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxx/test/configs/llvm-libc++-static.cfg.in b/libcxx/test/configs/llvm-libc++-static.cfg.in index e866d4f52a062..3dc4af1c000d5 100644 --- a/libcxx/test/configs/llvm-libc++-static.cfg.in +++ b/libcxx/test/configs/llvm-libc++-static.cfg.in @@ -7,10 +7,10 @@ config.substitutions.append(('%{flags}', '-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '') )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py index c7c0bad681ddc..150f74d403001 100644 --- a/libcxx/utils/libcxx/test/format.py +++ b/libcxx/utils/libcxx/test/format.py @@ -51,6 +51,8 @@ def _executeScriptInternal(test, litConfig, commands): if isinstance(res, lit.Test.Result): # Handle failure to parse the Lit test res = ("", res.output, 127, None) (out, err, exitCode, timeoutInfo) = res + if exitCode != 0: + litConfig.note(f"Command {parsedCommands} failed with code {exitCode}: {err}") return (out, err, exitCode, timeoutInfo, parsedCommands) diff --git a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in index 2e9472163b9d5..7e6999706b2c8 100644 --- a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in +++ b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in @@ -45,11 +45,11 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- ' diff --git a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in index ec0c93b0134a4..d2b86d65663fb 100644 --- a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in @@ -6,11 +6,11 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib} -- ' diff --git a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in index 2a9bc9061566f..83a6b4927c4f1 100644 --- a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in @@ -4,13 +4,13 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}','')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} ' + + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} ' + '-D__LIBC_NO_CPP_MATH_OVERLOADS__ ' + '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -pthread -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi -Wl,-bbigtoc' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi -Wl,-bbigtoc' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env LIBPATH=%{lib} -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in index c6fa4301b459c..861fc26baccaa 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in @@ -6,11 +6,11 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -pthread' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -pthread' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in index 1e9f202e8dd8a..749bf76be92f6 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in index cfdfc0f86090c..16b4d7c8cb06e 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' )) config.substitutions.append(('%{link_flags}', - '-nostdlib -L %{lib} -lc++ -lc++abi -lmsvcrt -lmsvcprt -loldnames' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib -L %{lib} -lc++ -lc++abi -lmsvcrt -lmsvcprt -loldnames' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in index 6b69205da77c9..86f4e65414058 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in @@ -7,10 +7,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -lc++abi -pthread' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -lc++abi -pthread' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in index ba67c8b2b7653..aaa63bc5a1a18 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' )) config.substitutions.append(('%{link_flags}', - '-nostdlib -L %{lib} -llibc++ -llibc++abi -lmsvcrt -lmsvcprt -loldnames' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib -L %{lib} -llibc++ -llibc++abi -lmsvcrt -lmsvcprt -loldnames' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in index 352e2c39586e1..b0e312d1c73fd 100644 --- a/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in +++ b/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in @@ -7,10 +7,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi -pthread' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi -pthread' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in b/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in index 4484573801bd2..5e16acb33d013 100644 --- a/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in +++ b/libunwind/test/configs/apple-libunwind-backdeployment.cfg.in @@ -45,10 +45,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include}' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include}' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lc++ -lc++abi -lunwind' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lc++ -lc++abi -lunwind' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- ' diff --git a/libunwind/test/configs/ibm-libunwind-shared.cfg.in b/libunwind/test/configs/ibm-libunwind-shared.cfg.in index c38d278ad2c9c..f8dd240d984c6 100644 --- a/libunwind/test/configs/ibm-libunwind-shared.cfg.in +++ b/libunwind/test/configs/ibm-libunwind-shared.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include}' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include}' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{lib} -lunwind -ldl -Wl,-bbigtoc' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -nostdlib++ -L %{lib} -lunwind -ldl -Wl,-bbigtoc' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env LIBPATH=%{lib} -- ' diff --git a/libunwind/test/configs/llvm-libunwind-merged.cfg.in b/libunwind/test/configs/llvm-libunwind-merged.cfg.in index 38b79840c9fe2..eabd9232bbd37 100644 --- a/libunwind/test/configs/llvm-libunwind-merged.cfg.in +++ b/libunwind/test/configs/llvm-libunwind-merged.cfg.in @@ -26,10 +26,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format(local_sysroot) if local_sysroot else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) )) config.substitutions.append(('%{link_flags}', - '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ {}'.format(' '.join(link_flags)) + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ {}'.format(' '.join(link_flags)) )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libunwind/test/configs/llvm-libunwind-mingw.cfg.in b/libunwind/test/configs/llvm-libunwind-mingw.cfg.in index 33d061a3efc6f..28f13b80ba595 100644 --- a/libunwind/test/configs/llvm-libunwind-mingw.cfg.in +++ b/libunwind/test/configs/llvm-libunwind-mingw.cfg.in @@ -5,10 +5,10 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{include} -funwind-tables' + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{include} -funwind-tables' )) config.substitutions.append(('%{link_flags}', - '-L %{lib} -lunwind' + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -L %{lib} -lunwind' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --prepend_env PATH=%{lib} -- ' diff --git a/libunwind/test/configs/llvm-libunwind-shared.cfg.in b/libunwind/test/configs/llvm-libunwind-shared.cfg.in index 13896aeb13bc4..5e839a54c641e 100644 --- a/libunwind/test/configs/llvm-libunwind-shared.cfg.in +++ b/libunwind/test/configs/llvm-libunwind-shared.cfg.in @@ -25,10 +25,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format(local_sysroot) if local_sysroot else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) )) config.substitutions.append(('%{link_flags}', - '-L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind {}'.format(' '.join(link_flags)) + '@CMAKE_EXE_LINKER_FLAGS_INIT@ -L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind {}'.format(' '.join(link_flags)) )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- ' diff --git a/libunwind/test/configs/llvm-libunwind-static.cfg.in b/libunwind/test/configs/llvm-libunwind-static.cfg.in index 50b64dc665a5a..f7111d40245f5 100644 --- a/libunwind/test/configs/llvm-libunwind-static.cfg.in +++ b/libunwind/test/configs/llvm-libunwind-static.cfg.in @@ -28,10 +28,10 @@ config.substitutions.append(('%{flags}', '-isysroot {}'.format(local_sysroot) if local_sysroot else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) + '@CMAKE_CXX_FLAGS_INIT@ -nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) )) config.substitutions.append(('%{link_flags}', - '%{{lib}}/libunwind.a {}'.format(' '.join(link_flags)) + '@CMAKE_EXE_LINKER_FLAGS_INIT@ %{{lib}}/libunwind.a {}'.format(' '.join(link_flags)) )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- '