Commit c5400f07 authored by xentec's avatar xentec Committed by Jakub Jirutka

[llvm]: build with MinSizeRel and our flags

parent e62454f8
......@@ -25,11 +25,13 @@ build() {
cd "$builddir"/build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
\
-DCMAKE_SKIP_INSTALL_RPATH=ON \
-DLLVM_INCLUDE_TESTS=ON
make
......
......@@ -23,9 +23,11 @@ build() {
cmake .. \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_FLAGS="$CFLAGS" \
\
-DLLVM_CONFIG_PATH="/usr/lib/llvm$_llvmver/bin/llvm-config" \
-DLIBUNWIND_HAS_NODEFAULTLIBS_FLAG=OFF
......
......@@ -46,9 +46,13 @@ build() {
cd "$builddir"/build
cmake .. -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
\
-DCLANG_VENDOR=Alpine \
-DCLANG_BUILD_EXAMPLES=OFF \
-DCLANG_INCLUDE_DOCS=ON \
......
......@@ -31,8 +31,12 @@ build() {
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
\
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
\
-DCOMPILER_RT_INCLUDE_TESTS=ON \
-DCOMPILER_RT_BUILD_SANITIZERS=OFF \
-DCOMPILER_RT_BUILD_XRAY=OFF
......
......@@ -75,8 +75,12 @@ build() {
local ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')"
cmake -Wno-dev \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_C_FLAGS_MINSIZEREL_INIT="$CFLAGS" \
-DCMAKE_CXX_FLAGS_MINSIZEREL_INIT="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT="$LDFLAGS" \
-DCMAKE_INSTALL_PREFIX=/$_prefix \
\
-DFFI_INCLUDE_DIR="$ffi_include_dir" \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DLLVM_BUILD_DOCS=OFF \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment