1 lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
3 libc_linker_script = '@CMAKE_INSTALL_PREFIX@/lib/picolibcpp.ld'
5 config.substitutions.append(('%{flags}', '--sysroot=@CMAKE_INSTALL_PREFIX@'))
7 config.substitutions.append(('%{compile_flags}',
8 '-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support'
10 # Disable warnings in cxx_atomic_impl.h:
11 # "large atomic operation may incur significant performance penalty; the
12 # access size (4 bytes) exceeds the max lock-free size (0 bytes)"
13 ' -Wno-atomic-alignment'
15 # Various libc++ headers check for the definition of _NEWLIB_VERSION
16 # which for picolibc is defined in picolibc.h.
17 ' -include picolibc.h'
19 config.substitutions.append(('%{link_flags}',
20 '-nostdlib -nostdlib++ -L %{lib} -lc++ -lc++abi'
21 ' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' +
22 ' -T {}'.format(libc_linker_script) +
23 ' -Wl,--defsym=__flash=0x0'
24 ' -Wl,--defsym=__flash_size=0x400000'
25 ' -Wl,--defsym=__ram=0x21000000'
26 ' -Wl,--defsym=__ram_size=0x1000000'
27 ' -Wl,--defsym=__stack_size=0x1000'
31 '@LIBCXX_SOURCE_DIR@/utils/qemu_baremetal.py'
32 ' --qemu @QEMU_SYSTEM_ARM@'
33 ' --machine mps2-an385'
35 config.substitutions.append(('%{exec}',
41 site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
42 import libcxx.test.params, libcxx.test.config
43 libcxx.test.config.configure(
44 libcxx.test.params.DEFAULT_PARAMETERS,
45 libcxx.test.features.DEFAULT_FEATURES,