From d6593751d91fd2db251f0f22dc3dab05b82136f4 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Tue, 15 Dec 2020 11:30:13 +0100 Subject: [PATCH] llvm build needs to be script based, in order to be able to compile it in release mode if debug mode is selected --- products/compil_scripts/llvm-8.0.1.sh | 46 +++++++++++++++++++++++++++ products/llvm.pyconf | 3 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 products/compil_scripts/llvm-8.0.1.sh diff --git a/products/compil_scripts/llvm-8.0.1.sh b/products/compil_scripts/llvm-8.0.1.sh new file mode 100755 index 0000000..ec49beb --- /dev/null +++ b/products/compil_scripts/llvm-8.0.1.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +echo "##########################################################################" +echo "LLVM " $VERSION +echo "##########################################################################" +CMAKE_OPTION="" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX:STRING=${PRODUCT_INSTALL}" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=Release" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_BUILD_LLVM_DYLIB=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_ENABLE_RTTI=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_INSTALL_UTILS=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_TARGETS_TO_BUILD:STRING=X86" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_ENABLE_DUMP=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON" +CMAKE_OPTIONS="${CMAKE_OPTIONS} -DPYTHON_EXECUTABLE=${PYTHON_ROOT_DIR}/bin/python" + +echo +echo "*** cmake" ${CMAKE_OPTIONS} +cmake ${CMAKE_OPTIONS} $SOURCE_DIR +if [ $? -ne 0 ] +then + echo "ERROR on cmake" + exit 1 +fi + +echo +echo "*** make" $MAKE_OPTIONS +make $MAKE_OPTIONS +if [ $? -ne 0 ] +then + echo "ERROR on make" + exit 2 +fi + +echo +echo "*** make install" +make install +if [ $? -ne 0 ] +then + echo "ERROR on make install" + exit 3 +fi + +echo +echo "########## END" + diff --git a/products/llvm.pyconf b/products/llvm.pyconf index 14ce5ae..46121c2 100644 --- a/products/llvm.pyconf +++ b/products/llvm.pyconf @@ -31,7 +31,8 @@ default : version_8_0_1_clang : { - cmake_options : "-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$LLVM_ROOT_DIR -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON -DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD:STRING=X86 -DPYTHON_EXECUTABLE=${PYTHON_ROOT_DIR}/bin/python -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON -DLLVM_ENABLE_DUMP=ON " + build_source : "script" + compil_script: "llvm-8.0.1.sh" } version_8_0_1_clang_win : -- 2.39.2