@@ -256,12 +256,19 @@ Below is an example that builds the builtins for Armv7-M, but runs the tests
256256as Armv7-A. It is presented in full, but is very similar to the earlier
257257command for Armv7-A build and test::
258258
259- LLVM_TOOLCHAIN=<path-to-llvm-install>/
259+ LLVM_TOOLCHAIN=<path to llvm install>/
260+
261+ # For the builtins.
260262 TARGET_TRIPLE=arm-none-eabi
261- GCC_TOOLCHAIN=<path-to-gcc- toolchain>
263+ GCC_TOOLCHAIN=<path to arm-none-eabi toolchain>/
262264 SYSROOT=${GCC_TOOLCHAIN}/${TARGET_TRIPLE}/libc
263265 COMPILE_FLAGS="-march=armv7-m -mfpu=vfpv2"
264266
267+ # For the test cases.
268+ A_PROFILE_TARGET_TRIPLE=arm-none-linux-gnueabihf
269+ A_PROFILE_GCC_TOOLCHAIN=<path to arm-none-linux-gnueabihf toolchain>/
270+ A_PROFILE_SYSROOT=${A_PROFILE_GCC_TOOLCHAIN}/${A_PROFILE_TARGET_TRIPLE}/libc
271+
265272 cmake ../llvm-project/compiler-rt \
266273 -G Ninja \
267274 -DCMAKE_AR=${LLVM_TOOLCHAIN}/bin/llvm-ar \
@@ -290,10 +297,10 @@ command for Armv7-A build and test::
290297 -DCOMPILER_RT_BUILD_ORC=OFF \
291298 -DCOMPILER_RT_BUILD_CRT=OFF \
292299 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
293- -DCOMPILER_RT_EMULATOR="qemu-arm -L <path to arm-none-linux-gnueabihf toolchain>/arm-none-linux-gnueabihf/libc " \
300+ -DCOMPILER_RT_EMULATOR="qemu-arm -L ${A_PROFILE_SYSROOT} " \
294301 -DCOMPILER_RT_INCLUDE_TESTS=ON \
295302 -DCOMPILER_RT_TEST_COMPILER=${LLVM_TOOLCHAIN}/bin/clang \
296- -DCOMPILER_RT_TEST_COMPILER_CFLAGS="--target=arm-none-linux-gnueabihf -march=armv7-a --gcc-toolchain=<path to arm-none-linux-gnueabihf toolchain> -- sysroot=<path to arm-none-linux-gnueabihf toolchain>/arm-none-linux-gnueabihf/libc -fuse-ld=lld" \
303+ -DCOMPILER_RT_TEST_COMPILER_CFLAGS="--target=${A_PROFILE_TARGET_TRIPLE} -march=armv7-a --gcc-toolchain=${A_PROFILE_GCC_TOOLCHAIN} -- sysroot=${A_PROFILE_SYSROOT} -fuse-ld=lld" \
297304 -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY \
298305 -DCOMPILER_RT_OS_DIR="baremetal" \
299306 -DCOMPILER_RT_BAREMETAL_BUILD=ON
0 commit comments