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()
34
34
35
35
serialize_lit_params_list (SERIALIZED_LIT_PARAMS LIBCXX_TEST_PARAMS )
36
36
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
-
62
37
if (LIBCXX_INCLUDE_TESTS )
63
38
include (AddLLVM ) # for configure_lit_site_cfg and add_lit_testsuite
64
39
Original file line number Diff line number Diff line change 3
3
4
4
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
5
5
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
+
6
20
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
7
21
config.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
9
23
))
10
24
config.substitutions.append(('%{link_flags}',
11
- '-nostdlib -L %{lib-dir} -lc++ -l' + config. cxx_lib
25
+ '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib
12
26
))
13
27
config.substitutions.append(('%{exec}',
14
28
'%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
Original file line number Diff line number Diff line change 4
4
5
5
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
6
6
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
+
7
21
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
8
22
config.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
10
24
))
11
25
config.substitutions.append(('%{link_flags}',
12
- '-nostdlib -L %{lib-dir} -lc++ -l' + config. cxx_lib
26
+ '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib
13
27
))
14
28
config.substitutions.append(('%{exec}',
15
29
'%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
Original file line number Diff line number Diff line change 3
3
4
4
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
5
5
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
+
6
20
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
7
21
config.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
9
23
))
10
24
config.substitutions.append(('%{link_flags}',
11
- '-nostdlib -L %{lib-dir} -llibc++ -l' + config. cxx_lib
25
+ '-nostdlib -L %{lib-dir} -llibc++ -l' + cxx_lib
12
26
))
13
27
config.substitutions.append(('%{exec}',
14
28
'%{executor} --execdir %T -- '
You can’t perform that action at this time.
0 commit comments