Mercurial > hg > CbC > CbC_llvm
diff libunwind/test/configs/llvm-libunwind-shared.cfg.in @ 236:c4bab56944e8 llvm-original
LLVM 16
author | kono |
---|---|
date | Wed, 09 Nov 2022 17:45:10 +0900 |
parents | |
children | 1f2b6ac9f198 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libunwind/test/configs/llvm-libunwind-shared.cfg.in Wed Nov 09 17:45:10 2022 +0900 @@ -0,0 +1,41 @@ +# +# Configuration file for running the libunwind tests against the shared library. +# + +lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') + +compile_flags = [] +link_flags = [] + +if @LIBUNWIND_ENABLE_CET@: + compile_flags.append('-fcf-protection=full') + +if '@CMAKE_SYSTEM_NAME@' == 'Linux': + link_flags.append('-Wl,--export-dynamic') + +# Stack unwinding tests need unwinding tables and these are not generated by default on all targets. +compile_flags.append('-funwind-tables') + +local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@' +config.substitutions.append(('%{flags}', + '-isysroot {}'.format(local_sysroot) if local_sysroot else '' +)) +config.substitutions.append(('%{compile_flags}', + '-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags)) +)) +config.substitutions.append(('%{link_flags}', + '-L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind -ldl {}'.format(' '.join(link_flags)) +)) +config.substitutions.append(('%{exec}', + '%{executor} --execdir %T -- ' +)) + +import os, site +site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils')) +import libcxx.test.params, libcxx.test.newconfig, libcxx.test.newconfig +libcxx.test.newconfig.configure( + libcxx.test.params.DEFAULT_PARAMETERS, + libcxx.test.features.DEFAULT_FEATURES, + config, + lit_config +)