Debian Codegraph @

libcxx/test/configs/llvm-libc++-shared-no-vcruntime-clangcl.cfg.in

raw
1 # This testing configuration handles running the test suite against LLVM's libc++
2 # using a DLL, with Clang-cl on Windows. This variant sets _HAS_EXCEPTIONS = 0
3 # which removes exception class definitions from the vcruntime.
4
5 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
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
21 config.substitutions.append(('%{flags}', '--driver-mode=g++'))
22 config.substitutions.append(('%{compile_flags}',
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
24 ))
25 config.substitutions.append(('%{link_flags}',
26 '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib
27 ))
28 config.substitutions.append(('%{exec}',
29 '%{executor} --execdir %T --prepend_env PATH=%{lib-dir} -- '
30 ))
31
32 import os, site
33 site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
34 import libcxx.test.params, libcxx.test.config
35 libcxx.test.config.configure(
36 libcxx.test.params.DEFAULT_PARAMETERS,
37 libcxx.test.features.DEFAULT_FEATURES,
38 config,
39 lit_config
40 )