Last active
September 19, 2025 14:00
-
-
Save camel-cdr/549057f5a75d8206bfea6fe092d7aa46 to your computer and use it in GitHub Desktop.
Cross compiling libclang-rt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git clone --depth=1 https://github.com/llvm/llvm-project | |
| cd llvm-project | |
| mkdir build | |
| cd build | |
| cmake -DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=ON -DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=ON -DCOMPILER_RT_BUILD_PROFILE=OFF -DCMAKE_C_COMPILER=$(which riscv64-linux-gnu-gcc) -DCMAKE_CXX_COMPILER=$(which riscv64-linux-gnu-g++) -DCMAKE_AR=$(which riscv64-linux-gnu-ar) -DCMAKE_NM=$(which riscv64-linux-gnu-nm) -DCMAKE_RANLIB=$(which riscv64-linux-gnu-ranlib) -DCMAKE_C_COMPILER_TARGET="riscv64-linux-gnu" -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DCMAKE_C_FLAGS="-march=rv64gcv" -DCMAKE_CXX_FLAGS="-march=rv64gcv" -DCMAKE_BUILD_TYPE=Release ../compiler-rt | |
| make -j$(nproc) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment