42 lines · plain
1# Testing configuration for back-deployment against the system-provided libunwind.2#3# Under this configuration, we compile and link all the test suite against the just-built4# libunwind, but we run against the system libunwind.5 6import os, site7site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))8import libcxx.test.params, libcxx.test.config, libcxx.test.dsl9 10lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')11 12config.substitutions.append(('%{flags}',13 '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''14))15config.substitutions.append(('%{compile_flags}',16 '-nostdinc++ -I %{include}'17))18config.substitutions.append(('%{link_flags}',19 '-nostdlib++ -L %{lib} -lc++ -lunwind'20))21config.substitutions.append(('%{exec}',22 '%{executor} --execdir %{temp} -- '23))24 25config.stdlib = 'apple-libc++'26config.using_system_stdlib = True27 28# TODO: This is a giant hack, but we need to change the install_name of libunwind.dylib because the29# upstream configuration can't currently produce a libunwind.dylib that is compatible with the30# Apple system one.31import subprocess32subprocess.check_call(['install_name_tool', '-id', '/usr/lib/system/libunwind.dylib', '@LIBUNWIND_TESTING_INSTALL_PREFIX@/lib/libunwind.dylib'])33 34import os, site35import libcxx.test.params, libcxx.test.config36libcxx.test.config.configure(37 libcxx.test.params.DEFAULT_PARAMETERS,38 libcxx.test.features.DEFAULT_FEATURES,39 config,40 lit_config41)42