paths.sh 1.08 KB
Newer Older
Twiga's avatar
Twiga committed
1
#!/bin/bash
rmrf's avatar
rmrf committed
2
3
4
5
##===================================================================
## 
## It is important to use this script to set all the necessary paths.
## 
Anirudh Kaushik's avatar
Anirudh Kaushik committed
6
7


rmrf's avatar
rmrf committed
8
9
# Path for where the binaries are for clang
# SET this.
Twiga's avatar
Update.    
Twiga committed
10
export LLVM_BUILD_DIR=/home/$USER/bin/clang-7.0.0/ 
rmrf's avatar
rmrf committed
11
12
13

# Path where SystemC is installed
# SET this.
14
export SYSTEMC=/home/$USER/code/systemc-2.3.3/systemc/
rmrf's avatar
rmrf committed
15
16
17
18
19
20

# Path for the systemc-clang build directory
# SET this.
export SYSTEMC_CLANG_BUILD_DIR=/home/$USER/code/systemc-clang-build/
##===================================================================

Anirudh Kaushik's avatar
Anirudh Kaushik committed
21
22
23
24
LLVMCOMPONENT=cppbackend
RTTIFLAG=-fno-rtti 
LLVMCONFIG=$LLVM_BUILD_DIR/bin/llvm-config

rmrf's avatar
rmrf committed
25
26
# New llvm/clang uses flags that are different than GNU gcc's
# Alternatively, you can use gcc and g++, but some flags don't work.
rmrf's avatar
rmrf committed
27
28
29
export CC=clang
export CXX=clang++
export LLVM_CXX_FLAGS=`$LLVMCONFIG --cxxflags`
rmrf's avatar
rmrf committed
30

rmrf's avatar
rmrf committed
31
# Generate all the flags.
Anirudh Kaushik's avatar
Anirudh Kaushik committed
32
export LLVM_CXX_FLAGS="$LLVM_CXX_FLAGS -fvisibility-inlines-hidden"
rmrf's avatar
rmrf committed
33
export LLVM_LIBS=`$LLVMCONFIG --libs` 
Anirudh Kaushik's avatar
Anirudh Kaushik committed
34
35
export LLVM_LD_FLAGS=`$LLVMCONFIG --ldflags`
export LLVM_LD_FLAGS=`echo $LLVM_LD_FLAGS | sed 's/ *$//g'`