brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 476c5ca Raw
41 lines · plain
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 = 03# which removes exception class definitions from the vcruntime.4 5lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')6 7dbg_include = ''8runtime_library = '@CMAKE_MSVC_RUNTIME_LIBRARY@'9if runtime_library == '' or runtime_library.endswith('DLL'):10    fms_runtime_lib = 'dll'11    cxx_lib = 'msvcprt'12else:13    fms_runtime_lib = 'static'14    cxx_lib = 'libcpmt'15 16if '@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 21config.substitutions.append(('%{flags}', '--driver-mode=g++'))22config.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_include24))25config.substitutions.append(('%{link_flags}',26    '-nostdlib -L %{lib-dir} -lc++ -l' + cxx_lib27))28config.substitutions.append(('%{exec}',29    '%{executor} --execdir %{temp} --prepend_env PATH=%{install-prefix}/bin -- '30))31 32import os, site33site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))34import libcxx.test.params, libcxx.test.config35libcxx.test.config.configure(36    libcxx.test.params.DEFAULT_PARAMETERS,37    libcxx.test.features.DEFAULT_FEATURES,38    config,39    lit_config40)41