File tree Expand file tree Collapse file tree 4 files changed +48
-31
lines changed
Expand file tree Collapse file tree 4 files changed +48
-31
lines changed Original file line number Diff line number Diff line change @@ -34,31 +34,6 @@ endif()
3434
3535serialize_lit_params_list(SERIALIZED_LIT_PARAMS LIBCXX_TEST_PARAMS)
3636
37- if (MSVC )
38- # Shared code for initializing some parameters used by all
39- # llvm-libc++-*-clangcl.cfg.in test configs.
40- set (dbg_include "" )
41-
42- if (NOT CMAKE_MSVC_RUNTIME_LIBRARY OR CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "DLL$" )
43- set (fms_runtime_lib "dll" )
44- set (cxx_lib "msvcprt" )
45- else ()
46- set (fms_runtime_lib "static" )
47- set (cxx_lib "libcpmt" )
48- endif ()
49-
50- if ((NOT CMAKE_MSVC_RUNTIME_LIBRARY AND uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
51- OR (CMAKE_MSVC_RUNTIME_LIBRARY MATCHES "Debug" ))
52- set (dbg_include " -include set_windows_crt_report_mode.h" )
53- set (fms_runtime_lib "${fms_runtime_lib} _dbg" )
54- set (cxx_lib "${cxx_lib} d" )
55- endif ()
56-
57- serialize_lit_string_param(SERIALIZED_LIT_PARAMS dbg_include "${dbg_include} " )
58- serialize_lit_string_param(SERIALIZED_LIT_PARAMS fms_runtime_lib "${fms_runtime_lib} " )
59- serialize_lit_string_param(SERIALIZED_LIT_PARAMS cxx_lib "${cxx_lib} " )
60- endif ()
61-
6237if (LIBCXX_INCLUDE_TESTS)
6338 include (AddLLVM) # for configure_lit_site_cfg and add_lit_testsuite
6439
Original file line number Diff line number Diff line change 33
44lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
55
6+ dbg_include = ''
7+ runtime_library = '@CMAKE_MSVC_RUNTIME_LIBRARY@'
8+ if runtime_library == '' or runtime_library.endswith('DLL'):
9+ fms_runtime_lib = 'dll'
10+ cxx_lib = 'msvcprt'
11+ else:
12+ fms_runtime_lib = 'static'
13+ cxx_lib = 'libcpmt'
14+
15+ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
16+ dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
17+ fms_runtime_lib += '_dbg'
18+ cxx_lib += 'd'
19+
620config.substitutions.append(('%{flags}', '--driver-mode=g++'))
721config.substitutions.append(('%{compile_flags}',
8- '-fms-runtime-lib=' + config. fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config. dbg_include
22+ '-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + dbg_include
923))
1024config.substitutions.append(('%{link_flags}',
11- '-nostdlib -L %{lib-dir} -lc++ -l' + config. cxx_lib
25+ '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib
1226))
1327config.substitutions.append(('%{exec}',
1428 '%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
Original file line number Diff line number Diff line change 44
55lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
66
7+ dbg_include = ''
8+ runtime_library = '@CMAKE_MSVC_RUNTIME_LIBRARY@'
9+ if runtime_library == '' or runtime_library.endswith('DLL'):
10+ fms_runtime_lib = 'dll'
11+ cxx_lib = 'msvcprt'
12+ else:
13+ fms_runtime_lib = 'static'
14+ cxx_lib = 'libcpmt'
15+
16+ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
17+ dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
18+ fms_runtime_lib += '_dbg'
19+ cxx_lib += 'd'
20+
721config.substitutions.append(('%{flags}', '--driver-mode=g++'))
822config.substitutions.append(('%{compile_flags}',
9- '-fms-runtime-lib=' + config. fms_runtime_lib + ' -nostdinc++ -I %{include-dir} -I %{target-include-dir} -I %{libcxx-dir}/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
23+ '-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{include-dir} -I %{target-include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -D_HAS_EXCEPTIONS=0' + dbg_include
1024))
1125config.substitutions.append(('%{link_flags}',
12- '-nostdlib -L %{lib-dir} -lc++ -l' + config. cxx_lib
26+ '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib
1327))
1428config.substitutions.append(('%{exec}',
1529 '%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
Original file line number Diff line number Diff line change 33
44lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
55
6+ dbg_include = ''
7+ runtime_library = '@CMAKE_MSVC_RUNTIME_LIBRARY@'
8+ if runtime_library == '' or runtime_library.endswith('DLL'):
9+ fms_runtime_lib = 'dll'
10+ cxx_lib = 'msvcprt'
11+ else:
12+ fms_runtime_lib = 'static'
13+ cxx_lib = 'libcpmt'
14+
15+ if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
16+ dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
17+ fms_runtime_lib += '_dbg'
18+ cxx_lib += 'd'
19+
620config.substitutions.append(('%{flags}', '--driver-mode=g++'))
721config.substitutions.append(('%{compile_flags}',
8- '-fms-runtime-lib=' + config. fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + config. dbg_include
22+ '-fms-runtime-lib=' + fms_runtime_lib + ' -nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX' + dbg_include
923))
1024config.substitutions.append(('%{link_flags}',
11- '-nostdlib -L %{lib-dir} -llibc++ -l' + config. cxx_lib
25+ '-nostdlib -L %{lib-dir} -llibc++ -l' + cxx_lib
1226))
1327config.substitutions.append(('%{exec}',
1428 '%{executor} --execdir %T -- '
You can’t perform that action at this time.
0 commit comments