Skip to content

Commit

Permalink
Add CMake toolchains
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartatz committed May 17, 2024
1 parent 38d9e7d commit fed2af8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,19 @@ make install
cd "${llvm_directory}/build"
rm --force --recursive ./*

# -DCMAKE_CXX_FLAGS='-static-libgcc -static-libstdc++' \

cmake \
${cmake_cross_compile_flags} \
-DCMAKE_BUILD_TYPE='MinSizeRel' \
-DCMAKE_CXX_FLAGS='-static-libgcc -static-libstdc++ -Wl,-s' \
-DLLVM_ENABLE_ASSERTIONS=OFF \
-DLLVM_ENABLE_PROJECTS='lld' \
-DLLVM_TOOLCHAIN_TOOLS='llvm-ar;llvm-ranlib;llvm-objdump;llvm-rc;llvm-cvtres;llvm-nm;llvm-strings;llvm-readobj;llvm-dlltool;llvm-pdbutil;llvm-objcopy;llvm-strip;llvm-cov;llvm-profdata;llvm-addr2line;llvm-symbolizer;llvm-windres;llvm-ml;llvm-readelf;llvm-size;llvm-cxxfilt' \
-DCMAKE_INSTALL_PREFIX="${toolchain_directory}" \
${cmake_cross_compile_flags} \
"${llvm_directory}/llvm"

cmake --build ./ -- -j $((max_jobs / 2))
cmake --install ./
cmake --install ./ --strip

sed -i 's/#include <stdint.h>/#include <stdint.h>\n#include <stdio.h>/g' "${toolchain_directory}/include/mpc.h"

Expand Down

0 comments on commit fed2af8

Please sign in to comment.