brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 34950f6 Raw
50 lines · plain
1#2# Configuration file for running the libunwind tests against a libc++ shared library3# into which the unwinder was merged.4#5 6lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')7 8compile_flags = []9link_flags = []10 11if @LIBUNWIND_ENABLE_CET@:12    compile_flags.append('-fcf-protection=full')13 14if @LIBUNWIND_ENABLE_GCS@:15    compile_flags.append('-mbranch-protection=standard')16 17# On ELF platforms, link tests with -Wl,--export-dynamic if supported by the linker.18if len('@CMAKE_EXE_EXPORTS_CXX_FLAG@'):19    link_flags.append('@CMAKE_EXE_EXPORTS_CXX_FLAG@')20 21if '@CMAKE_DL_LIBS@':22    link_flags.append('-l@CMAKE_DL_LIBS@')23 24# Stack unwinding tests need unwinding tables and these are not generated by default on all targets.25compile_flags.append('-funwind-tables')26 27local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'28config.substitutions.append(('%{flags}',29    '-isysroot {}'.format(local_sysroot) if local_sysroot else ''30))31config.substitutions.append(('%{compile_flags}',32    '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))33))34config.substitutions.append(('%{link_flags}',35    '-L %{{lib}} -Wl,-rpath,%{{lib}} -lc++ {}'.format(' '.join(link_flags))36))37config.substitutions.append(('%{exec}',38    '%{executor} --execdir %{temp} -- '39))40 41import os, site42site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))43import libcxx.test.params, libcxx.test.config44libcxx.test.config.configure(45    libcxx.test.params.DEFAULT_PARAMETERS,46    libcxx.test.features.DEFAULT_FEATURES,47    config,48    lit_config49)50