forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathllvm-libc++-static-clangcl.cfg.in
39 lines (34 loc) · 1.39 KB
/
llvm-libc++-static-clangcl.cfg.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This testing configuration handles running the test suite against LLVM's libc++
# using a static library, with Clang-cl on Windows.
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
dbg_include = ''
runtime_library = '@CMAKE_MSVC_RUNTIME_LIBRARY@'
if runtime_library == '' or runtime_library.endswith('DLL'):
fms_runtime_lib = 'dll'
cxx_lib = 'msvcprt'
else:
fms_runtime_lib = 'static'
cxx_lib = 'libcpmt'
if '@CMAKE_BUILD_TYPE@'.upper() == 'DEBUG':
dbg_include = ' -D_DEBUG -include set_windows_crt_report_mode.h'
fms_runtime_lib += '_dbg'
cxx_lib += 'd'
config.substitutions.append(('%{flags}', '--driver-mode=g++'))
config.substitutions.append(('%{compile_flags}',
'-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
))
config.substitutions.append(('%{link_flags}',
'-nostdlib -L %{lib-dir} -llibc++ -l' + cxx_lib
))
config.substitutions.append(('%{exec}',
'%{executor} --execdir %T -- '
))
import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
import libcxx.test.params, libcxx.test.config
libcxx.test.config.configure(
libcxx.test.params.DEFAULT_PARAMETERS,
libcxx.test.features.DEFAULT_FEATURES,
config,
lit_config
)