llvm-project
39 строк · 1.2 Кб
1lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
2
3libc_linker_script = '@CMAKE_INSTALL_PREFIX@/lib/picolibcpp.ld'
4
5config.substitutions.append(('%{flags}', '--sysroot=@CMAKE_INSTALL_PREFIX@'))
6
7config.substitutions.append(('%{compile_flags}',
8'-nostdinc++ -I %{include}'
9))
10config.substitutions.append(('%{link_flags}',
11'-nostdlib -nostdlib++ -L %{lib} -lunwind'
12' -lc -lm -lclang_rt.builtins -lsemihost -lcrt0-semihost' +
13' -T {}'.format(libc_linker_script) +
14' -Wl,--defsym=__flash=0x0'
15' -Wl,--defsym=__flash_size=0x400000'
16' -Wl,--defsym=__ram=0x21000000'
17' -Wl,--defsym=__ram_size=0x1000000'
18' -Wl,--defsym=__stack_size=0x1000'
19))
20
21config.executor = (
22'@LIBUNWIND_LIBCXX_PATH@/utils/qemu_baremetal.py'
23' --qemu @QEMU_SYSTEM_ARM@'
24' --machine mps2-an385'
25' --cpu cortex-m3')
26config.substitutions.append(('%{exec}',
27'%{executor}'
28' --execdir %T'
29))
30
31import os, site
32site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))
33import libcxx.test.params, libcxx.test.config
34libcxx.test.config.configure(
35libcxx.test.params.DEFAULT_PARAMETERS,
36libcxx.test.features.DEFAULT_FEATURES,
37config,
38lit_config
39)
40