-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
executable file
·47 lines (39 loc) · 1.17 KB
/
build.sh
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
40
41
42
43
44
45
46
47
#!/bin/bash
set -e
# creates api code for plugins
python ../scripts/apigen.py
# creates pandalog code
sh ./pp.sh
# only
LLVM_BIT=""
if [ -e ../llvm/Release ]
then
echo "Found ../llvm -- LLVM SUPPORT IS ENABLED"
llvm=`/bin/readlink -f ../llvm/Release`
LLVM_BIT="--enable-llvm --with-llvm=$llvm"
else
if llvm-config --version >/dev/null 2>/dev/null && [ $(llvm-config --version) == "3.3" ]
then
echo "Found system llvm -- LLVM SUPPORT IS ENABLED"
LLVM_BIT="--enable-llvm --with-llvm=$(llvm-config --prefix)"
else
if llvm-config-3.3 --version >/dev/null 2>/dev/null
then
echo "Found system llvm -- LLVM SUPPORT IS ENABLED"
LLVM_BIT="--enable-llvm --with-llvm=$(llvm-config-3.3 --prefix)"
else
echo "No llvm dir found -- LLVM SUPPORT IS DISABLED"
fi
fi
fi
echo $LLVM_BIT
./configure --target-list=x86_64-softmmu,i386-softmmu,arm-softmmu \
--prefix=`pwd`/install \
--disable-pie \
--disable-xen \
--disable-libiscsi \
$LLVM_BIT \
--extra-cflags="-O2 -I/usr/local/include" \
--extra-cxxflags="-O2" \
--extra-ldflags="-L/usr/local/lib -L/usr/local/lib64 -L/usr/local/lib -lprotobuf-c -lprotobuf -lpthread" \
make -j ${PANDA_NPROC:-$(nproc)}