aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test/configs/apple-libc++-shared.cfg.in
blob: 2d0aee3ae905e8f9e34ddbf1971b53b2eea69281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Testing configuration for Apple's system libc++.
#
# This configuration differs from a normal LLVM shared library configuration in
# that we must use DYLD_LIBRARY_PATH to run the tests against the just-built library,
# since Apple's libc++ has an absolute install_name.
#
# We also don't use a per-target include directory layout, so we have only one
# include directory for the libc++ headers.

lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')

config.substitutions.append(('%{flags}',
    '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
))
config.substitutions.append(('%{compile_flags}',
    '-nostdinc++ -I %{include-dir} -I %{libcxx-dir}/test/support'
))
config.substitutions.append(('%{link_flags}',
    '-nostdlib++ -L %{lib-dir} -lc++'
))
config.substitutions.append(('%{exec}',
    '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib-dir} -- '
))

config.stdlib = 'apple-libc++'

import os, site
site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
import libcxx.test.params, libcxx.test.config
libcxx.test.config.configure(
    libcxx.test.params.DEFAULT_PARAMETERS,
    libcxx.test.features.DEFAULT_FEATURES,
    config,
    lit_config
)