1# Testing configuration for Apple's system libc++. 2# 3# This configuration differs from a normal LLVM shared library configuration in 4# that we must use DYLD_LIBRARY_PATH to run the tests against the just-built library, 5# since Apple's libc++ has an absolute install_name. 6# 7# We also don't use a per-target include directory layout, so we have only one 8# include directory for the libc++ headers. 9 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-dir} -I %{libcxx-dir}/test/support' 17)) 18config.substitutions.append(('%{link_flags}', 19 '-nostdlib++ -L %{lib-dir} -lc++' 20)) 21config.substitutions.append(('%{exec}', 22 '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib-dir} -- ' 23)) 24 25config.stdlib = 'apple-libc++' 26 27import os, site 28site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils')) 29import libcxx.test.params, libcxx.test.config 30libcxx.test.config.configure( 31 libcxx.test.params.DEFAULT_PARAMETERS, 32 libcxx.test.features.DEFAULT_FEATURES, 33 config, 34 lit_config 35) 36