From ec71f8b839b98e91e17b76cbb1f94d8f28ef09fd Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jeremy@system76.com> Date: Fri, 14 Dec 2018 17:30:50 -0700 Subject: [PATCH] Fix compilation of native tablegen --- recipes/llvm/native.cmake | 2 ++ recipes/llvm/recipe.sh | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 recipes/llvm/native.cmake diff --git a/recipes/llvm/native.cmake b/recipes/llvm/native.cmake new file mode 100644 index 000000000..4b0abbfa3 --- /dev/null +++ b/recipes/llvm/native.cmake @@ -0,0 +1,2 @@ +set(CMAKE_C_COMPILER cc) +set(CMAKE_CXX_COMPILER c++) diff --git a/recipes/llvm/recipe.sh b/recipes/llvm/recipe.sh index e875cefe1..eaa90b0c2 100644 --- a/recipes/llvm/recipe.sh +++ b/recipes/llvm/recipe.sh @@ -18,18 +18,20 @@ function recipe_prepare { } function recipe_build { + native="$(realpath ../native.cmake)" source="$(realpath ../source)" sysroot="$(realpath ../sysroot)" CMAKE_ARGS=( -Wno-dev -DCMAKE_CROSSCOMPILING=True + -DCROSS_TOOLCHAIN_FLAGS_NATIVE="-DCMAKE_TOOLCHAIN_FILE=$native" -DCMAKE_INSTALL_PREFIX="/" -DLLVM_DEFAULT_TARGET_TRIPLE="$HOST" -DLLVM_TARGET_ARCH="$ARCH" -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_SYSTEM_NAME=Generic -DPYTHON_EXECUTABLE="/usr/bin/python2" - -DLLVM_TABLEGEN="/usr/bin/llvm-tblgen-8" + #-DLLVM_TABLEGEN="/usr/bin/llvm-tblgen-8" -DUNIX=1 -DLLVM_ENABLE_THREADS=Off -DLLVM_BUILD_BENCHMARKS=Off @@ -56,7 +58,7 @@ function recipe_build { -DLLVM_TOOL_LLVM_RTDYLD_BUILD=Off ) cmake "${CMAKE_ARGS[@]}" "$source" - make VERBOSE=1 -j$(nproc) + make -j$(nproc) skip=1 } -- GitLab