diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -52,22 +52,22 @@ set(dbg_include "") if (NOT CMAKE_MSVC_RUNTIME_LIBRARY OR CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$") - set(crt_lib "msvcrt") + set(fms_runtime_lib "dll") set(cxx_lib "msvcprt") else() - set(crt_lib "libcmt") + set(fms_runtime_lib "static") set(cxx_lib "libcpmt") endif() if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") OR (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "Debug")) - set(dbg_include " -D_DEBUG -include set_windows_crt_report_mode.h") - set(crt_lib "${crt_lib}d") + set(dbg_include " -include set_windows_crt_report_mode.h") + set(fms_runtime_lib "${fms_runtime_lib}_dbg") set(cxx_lib "${cxx_lib}d") endif() serialize_lit_param(dbg_include "\"${dbg_include}\"") - serialize_lit_param(crt_lib "\"${crt_lib}\"") + serialize_lit_param(fms_runtime_lib "\"${fms_runtime_lib}\"") serialize_lit_param(cxx_lib "\"${cxx_lib}\"") endif() diff --git a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in --- a/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in +++ b/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in @@ -5,10 +5,10 @@ config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-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 + '-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%s -l%s -loldnames' % (config.crt_lib, config.cxx_lib) + '-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-no-vcruntime-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in --- 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 @@ config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-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 + '-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%s -l%s -loldnames' % (config.crt_lib, config.cxx_lib) + '-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++-static-clangcl.cfg.in b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in --- a/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in +++ b/libcxx/test/configs/llvm-libc++-static-clangcl.cfg.in @@ -5,10 +5,10 @@ config.substitutions.append(('%{flags}', '--driver-mode=g++')) config.substitutions.append(('%{compile_flags}', - '-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 + '-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%s -l%s -loldnames' % (config.crt_lib, config.cxx_lib) + '-nostdlib -L %{lib} -llibc++ -l' + config.cxx_lib )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T -- '