-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
17 changed files
with
618 additions
and
95 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
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM ubuntu:jammy | ||
|
||
RUN apt update | ||
RUN apt install -y g++-12 gcc-12 build-essential cmake libssl-dev pkg-config git wget ninja-build nano libzip-dev | ||
|
||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 60 | ||
RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 60 | ||
RUN update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-12 60 | ||
|
||
ENV CFLAGS="-Og -fsanitize=thread" | ||
ENV CXXFLAGS="-Og -fsanitize=thread" | ||
ENV LDFLAGS="-fsanitize=thread -static-libtsan -static-libgcc -static-libstdc++" | ||
|
||
WORKDIR /opt | ||
|
||
#Build boost with support for asan | ||
RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2 | ||
RUN tar xf boost_1_81_0.tar.bz2 | ||
|
||
WORKDIR /opt/boost_1_81_0 | ||
|
||
RUN ./bootstrap.sh --prefix=/usr | ||
RUN ./b2 cxxflags="-fsanitize=thread -Og -std=c++17 -DBOOST_USE_TSAN -DBOOST_USE_UCONTEXT" linkflags="-ltsan -static-libtsan -static-libgcc -static-libstdc++" variant=debug link=static threading=multi context-impl=ucontext | ||
RUN ./b2 cxxflags="-fsanitize=thread -Og -std=c++17 -DBOOST_USE_TSAN -DBOOST_USE_UCONTEXT" linkflags="-ltsan -static-libtsan -static-libgcc -static-libstdc++" variant=debug link=static threading=multi context-impl=ucontext install | ||
|
||
WORKDIR /opt | ||
|
||
#Build latest hiredis containing sdevent support, not available yet in apt | ||
RUN wget https://github.com/redis/hiredis/archive/refs/tags/v1.2.0.tar.gz | ||
RUN tar xf v1.2.0.tar.gz | ||
RUN mkdir /opt/hiredis-1.2.0/build | ||
|
||
WORKDIR /opt/hiredis-1.2.0/build | ||
RUN cmake -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDISABLE_TESTS=1 -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SSL=1 .. | ||
RUN ninja && ninja install | ||
|
||
RUN mkdir -p /opt/ichor/build | ||
|
||
WORKDIR /opt/ichor/build | ||
|
||
RUN unset CFLAGS | ||
RUN unset CXXFLAGS | ||
|
||
ENTRYPOINT ["/bin/bash", "-c"] | ||
|
||
CMD ["cd /opt/ichor/build && cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DICHOR_USE_SANITIZERS=0 -DICHOR_USE_THREAD_SANITIZER=1 -DICHOR_USE_HIREDIS=1 -DICHOR_USE_BOOST_BEAST=1 -DICHOR_USE_SPDLOG=1 /opt/ichor/src && ninja"] |
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
Oops, something went wrong.