forked from JonasToth/llvm-bolt-builds
-
Notifications
You must be signed in to change notification settings - Fork 5
/
build_stage2-prof-generate.bash
executable file
·39 lines (34 loc) · 1.25 KB
/
build_stage2-prof-generate.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
TOPLEV=~/toolchain/llvm
cd ${TOPLEV}
mkdir ${TOPLEV}/stage2-prof-gen || (echo "Could not create stage2-prof-generate directory"; exit 1)
cd ${TOPLEV}/stage2-prof-gen
CPATH=${TOPLEV}/llvm-bolt/bin
echo "== Configure Build"
echo "== Build with stage1-tools -- $CPATH"
cmake -G Ninja ${TOPLEV}/llvm-project/llvm \
-DLLVM_BINUTILS_INCDIR=/usr/include \
-DCLANG_ENABLE_ARCMT=OFF \
-DCLANG_ENABLE_STATIC_ANALYZER=OFF \
-DCLANG_PLUGIN_SUPPORT=OFF \
-DLLVM_ENABLE_BINDINGS=OFF \
-DLLVM_ENABLE_OCAMLDOC=OFF \
-DLLVM_INCLUDE_DOCS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DCMAKE_C_COMPILER=${CPATH}/clang \
-DCMAKE_CXX_COMPILER=${CPATH}/clang++ \
-DLLVM_USE_LINKER=${CPATH}/ld.lld \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD="X86" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_ENABLE_WARNINGS=OFF \
-DCMAKE_INSTALL_PREFIX=${TOPLEV}/stage2-prof-gen/install \
-DLLVM_BUILD_INSTRUMENTED=IR \
-DLLVM_BUILD_RUNTIME=OFF \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_VP_COUNTERS_PER_SITE=6 \
-DLLVM_BUILD_INSTRUMENTED=IR \
-DLLVM_ENABLE_PLUGINS=ON \
-DLLVM_BUILD_RUNTIME=No || (echo "Could not configure project!"; exit 1)
echo "== Start Build"
ninja || (echo "Could not build project!"; exit 1)