[all-commits] [llvm/llvm-project] 80cf21: [libc] Fix unit test compile flags propagation. (#...
lntue via All-commits
all-commits at lists.llvm.org
Fri Sep 6 08:56:28 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80cf21dad150ae8fb82e4a17f3bc594d1486b210
https://github.com/llvm/llvm-project/commit/80cf21dad150ae8fb82e4a17f3bc594d1486b210
Author: lntue <35648136+lntue at users.noreply.github.com>
Date: 2024-09-06 (Fri, 06 Sep 2024)
Changed paths:
M libc/CMakeLists.txt
M libc/cmake/modules/LLVMLibCArchitectures.cmake
M libc/cmake/modules/LLVMLibCCheckCpuFeatures.cmake
M libc/cmake/modules/LLVMLibCCheckMPFR.cmake
M libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
M libc/cmake/modules/LLVMLibCTestRules.cmake
M libc/test/UnitTest/CMakeLists.txt
M libc/test/integration/startup/CMakeLists.txt
M libc/utils/MPFRWrapper/CMakeLists.txt
Log Message:
-----------
[libc] Fix unit test compile flags propagation. (#106128)
With this change, I was able to build and test for aarch64 & riscv64 on
x86-64 host as follow:
Pre-requisite:
- cross build toolchain for aarch64
```
$ sudo apt install binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
```
- cross build toolchain for riscv64
```
$ sudo apt install binutils-riscv64-linux-gnu gcc-riscv64-linux-gnu g++-riscv64-linux-gnu
```
- qemu user:
```
$ sudo apt install qemu qemu-user qemu-user-static
```
CMake invocation:
```
$ cmake ../runtimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLIBC_TARGET_TRIPLE=<aarch64-linux-gnu/riscv64-linux-gnu> -DCMAKE_BUILD_TYPE=Release -DLIBC_TEST_COMPILE_OPTIONS_DEFAULT="-static"
$ ninja libc
$ ninja check-libc
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list