File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ set (CMAKE_CXX_STANDARD 17)
5
5
set (CMAKE_EXPORT_COMPILE_COMMANDS TRUE )
6
6
7
7
# Modify this based on where you cloned and build llvm,
8
- set (LLVM_PATH $ENV{HOME} /llvm-project/llvm/build )
8
+ set (LLVM_PATH $ENV{LLVM_BUILD_PATH} )
9
9
find_package (LLVM REQUIRED CONFIG )
10
10
11
11
link_directories (${LLVM_PATH} /lib )
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Installing and building LLVM (LLVM-14/clang-14) from source.
15
15
You must have ` cmake ` , ` make ` , ` cmake-data ` installed along with ` binutils ` .
16
16
17
17
- [ Building LLVM From Source] ( https://llvm.org/docs/CMake.html )
18
+ - [ Other Dependencies] ( https://llvm.org/docs/GettingStarted.html#software )
18
19
19
20
``` bash
20
21
# Install NCurses GUI/dev
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ RUN apt-get update ; apt-get install --no-install-recommends \
17
17
libxml2-dev \
18
18
make \
19
19
musl-dev \
20
+ ninja-build \
20
21
libncurses5-dev libncursesw5-dev \
21
22
python3 \
22
23
python3-dev \
@@ -25,14 +26,19 @@ RUN apt-get update ; apt-get install --no-install-recommends \
25
26
wget
26
27
27
28
WORKDIR /
28
- RUN git clone --progress --verbose https://github.com/llvm/llvm-project.git ; cd llvm-project ; cmake -S llvm -B build -G "Unix Makefiles" \
29
+ RUN git clone --progress --verbose --depth 1 https://github.com/llvm/llvm-project.git
30
+
31
+ RUN cd llvm-project ; cmake -S llvm -B build -G "Ninja" \
29
32
-DLLVM_ENABLE_PROJECTS="llvm;clang;compiler-rt" \
30
33
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
31
- -DCMAKE_BUILD_TYPE=MinSizeRel \
32
- -DLLVM_INSTALL_UTILS=ON ; cd build ; make -j 2 ; make install
34
+ -DCMAKE_BUILD_TYPE=Release \
35
+ -DLLVM_INSTALL_UTILS=ON ; cd build ; ninja all ; ninja install
36
+
33
37
RUN git clone https://github.com/lahiri-phdworks/LLVM-Examples
34
38
35
- ENV CXX=clang++
36
- ENV CC=clang
37
- ENV OPT=opt
38
- ENV HOME=HOME
39
+ ENV CXX=/llvm-project/build/bin/clang++
40
+ ENV CC=/llvm-project/build/bin/clang
41
+ ENV OPT=/llvm-project/build/bin/opt
42
+ ENV HOME=
43
+ ENV LLVM_BUILD_PATH=/llvm-project/build
44
+ ENV LLVM_BIN_DIR=/llvm-project/build/bin
You can’t perform that action at this time.
0 commit comments