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