-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
FROM ubuntu:16.04 | ||
|
||
# Stop script if any individual command fails. | ||
RUN set -e | ||
|
||
# Define LLVM version. | ||
ENV llvm_version=6.0.0 | ||
|
||
# Define dependencies. | ||
ENV lib_deps="make g++ git zlib1g-dev libncurses5-dev libssl-dev libpcre2-dev zip vim" | ||
ENV build_deps="wget xz-utils cmake python" | ||
|
||
# Fetch dependencies. | ||
RUN apt-get update | ||
RUN apt-get install -y $build_deps $lib_deps | ||
|
||
# Fetch and extract LLVM source. | ||
RUN echo "Building LLVM ${llvm_version}" | ||
RUN mkdir -p /home/ysui/llvm-${llvm_version} | ||
WORKDIR /home/ysui/llvm-${llvm_version} | ||
RUN wget "http://llvm.org/releases/${llvm_version}/llvm-${llvm_version}.src.tar.xz" | ||
RUN tar xvf "llvm-${llvm_version}.src.tar.xz" | ||
RUN rm "llvm-${llvm_version}.src.tar.xz" | ||
RUN mkdir llvm-${llvm_version}.obj | ||
WORKDIR /home/ysui/llvm-${llvm_version}/llvm-${llvm_version}.obj | ||
RUN cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../llvm-${llvm_version}.src | ||
RUN make -j4 | ||
|
||
# Fetch and extract SVF source. | ||
RUN echo "Building SVF" | ||
WORKDIR / | ||
RUN wget "https://github.com/SVF-tools/SVF/archive/master.zip" | ||
RUN unzip master.zip | ||
WORKDIR /SVF-master | ||
RUN bash ./build.sh | ||
|
||
|
||
# Build and install LLVM from source. | ||
#RUN mkdir build && cd build | ||
#RUN cmake -j4 -DCMAKE_BUILD_TYPE=MinSizeRel .. | ||
#RUN cmake -j4 --build . | ||
|
||
|
||
# Cleanup LLVM source directory. | ||
#rm -rf /src | ||
|
||
# Cleanup build dependencies and apt cache. | ||
RUN apt-get remove -y $build_deps | ||
RUN apt autoremove -y | ||
RUN rm -rf /var/lib/apt/lists/* | ||
RUN rm -rf /master.zip | ||
|
||
|
||
|