-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6346 from trailofbits/carson/debugging
Major Refactor for PolyTracker v3.0.0
- Loading branch information
Showing
2,927 changed files
with
10,721 additions
and
863,248 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
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
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
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 |
---|---|---|
@@ -1,63 +1,34 @@ | ||
FROM ubuntu:bionic | ||
MAINTAINER Evan Sultanik <[email protected]> | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
wget \ | ||
gnupg | ||
FROM trailofbits/polytracker-llvm:b75b84ed4ce03bc4250c32063d08a1cbd8a05e02 | ||
|
||
# Add the LLVM repo for Ubuntu packages, since the official Ubuntu repo has an | ||
# LLVM that doesn't work right with polytracker for some reason. | ||
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \ | ||
&& echo "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" >>/etc/apt/sources.list | ||
MAINTAINER Evan Sultanik <[email protected]> | ||
MAINTAINER Carson Harmon <[email protected]> | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get -y update \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
clang-7 \ | ||
cmake \ | ||
git \ | ||
lld-7 \ | ||
llvm-7 \ | ||
libc++abi-dev \ | ||
ninja-build \ | ||
python3-pip \ | ||
python3.7-dev \ | ||
golang \ | ||
libgraphviz-dev \ | ||
graphviz | ||
|
||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 10 | ||
RUN python3 -m pip install pip | ||
|
||
RUN go get github.com/SRI-CSL/gllvm/cmd/... | ||
|
||
ENV PATH="$PATH:/root/go/bin" | ||
|
||
RUN python3.7 -m pip install pytest | ||
python3-pip \ | ||
python3.8-dev \ | ||
libgraphviz-dev \ | ||
graphviz \ | ||
libsqlite3-dev \ | ||
vim \ | ||
gdb \ | ||
sqlite3 | ||
|
||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 10 | ||
RUN python3 -m pip install pip && python3 -m pip install pytest | ||
|
||
COPY . /polytracker | ||
|
||
WORKDIR /polytracker | ||
|
||
RUN pip3 install pytest . | ||
|
||
RUN rm -rf build && mkdir -p build | ||
|
||
RUN pip3 install . | ||
RUN mkdir /polytracker/build | ||
WORKDIR /polytracker/build | ||
RUN cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_VERBOSE_MAKEFILE=TRUE -DCXX_LIB_PATH=/cxx_libs .. | ||
RUN ninja install | ||
|
||
ENV PATH="/usr/lib/llvm-7/bin:${PATH}" | ||
|
||
RUN cmake -G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_VERBOSE_MAKEFILE=TRUE .. && ninja install | ||
ENV PATH="/polytracker/build/bin/:${PATH}" | ||
ENV CC=polybuild | ||
ENV CXX=polybuild++ | ||
ENV LLVM_COMPILER=clang | ||
RUN mkdir -p "/build_artifacts" | ||
|
||
# Set the BC store path to the <install_path>/cxx_libs/bitcode/bitcode_store} | ||
ENV WLLVM_BC_STORE="/polytracker/build/share/polytracker/cxx_libs/bitcode/bitcode_store" | ||
ENV WLLVM_ARTIFACT_STORE="/build_artifacts" | ||
|
||
# Setting up build enviornment for targets | ||
ENV POLYTRACKER_CAN_RUN_NATIVELY=1 | ||
|
||
WORKDIR /polytracker | ||
ENV CC=/polytracker/build/bin/polybuild_script | ||
ENV CXX=/polytracker/build/bin/polybuild_script++ | ||
ENV PATH=/polytracker/build/bin:$PATH |
Oops, something went wrong.