-
Notifications
You must be signed in to change notification settings - Fork 10.7k
/
armv7m-picolibc-libc++.cfg.in
42 lines (36 loc) · 1.5 KB
/
armv7m-picolibc-libc++.cfg.in
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
36
37
38
39
40
41
42
lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
libc_linker_script = '@CMAKE_INSTALL_PREFIX@/lib/picolibcpp.ld'
config.substitutions.append(('%{flags}', '--sysroot=@CMAKE_INSTALL_PREFIX@'))
config.substitutions.append(('%{compile_flags}',
'-nostdinc++ -I %{include} -I %{target-include} -I %{libcxx}/test/support'
# Disable warnings in cxx_atomic_impl.h:
# "large atomic operation may incur significant performance penalty; the
# access size (4 bytes) exceeds the max lock-free size (0 bytes)"
' -Wno-atomic-alignment'
# Various libc++ headers check for the definition of _NEWLIB_VERSION
# which for picolibc is defined in picolibc.h.
' -include picolibc.h'
))
config.substitutions.append(('%{link_flags}',
'-nostdlib -nostdlib++ -L %{lib} -lc++ -lc++abi'
' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' +
' -T {}'.format(libc_linker_script) +
' -Wl,--defsym=__flash=0x0'
' -Wl,--defsym=__flash_size=0x400000'
' -Wl,--defsym=__ram=0x21000000'
' -Wl,--defsym=__ram_size=0x1000000'
' -Wl,--defsym=__stack_size=0x1000'
))
config.substitutions.append(('%{exec}',
'true' # TODO use qemu-system-arm
))
config.available_features.add('libcxx-fake-executor')
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
)