fix(docker/builder): enforce DRAIOS_DEBUG_FLAGS to DNDEBUG when BUILD_TYPE=debug

This is a temporary fix for Travis CI (which is where we use
falco-builder docker image).

Was already done in the past (see:
9285aa59c1 (diff-354f30a63fb0907d4ad57269548329e3)).

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato
2019-07-23 01:06:09 +00:00
committed by Leo Di Donato
parent 95a7cf3ea8
commit b369de3801
2 changed files with 6 additions and 5 deletions

View File

@@ -36,9 +36,7 @@ RUN source scl_source enable devtoolset-7 && \
rm -rf /tmp/cmake-${CMAKE_VERSION}
# fixme: deps needs a fix into CMakeLists.txt
RUN yum -y install libyaml-devel
RUN yum clean all -y
RUN yum -y install libyaml-devel && yum clean all -y
COPY ./root /

View File

@@ -9,8 +9,10 @@ shift
# Build type can be "debug" or "release", fallbacks to "release" by default
BUILD_TYPE=$(echo "$BUILD_TYPE" | tr "[:upper:]" "[:lower:]")
DRAIOS_DEBUG_FLAGS=
case "$BUILD_TYPE" in
"debug")
DRAIOS_DEBUG_FLAGS="-D_DEBUG -DNDEBUG"
;;
*)
BUILD_TYPE="release"
@@ -39,6 +41,7 @@ case "$CMD" in
-DBUILD_BPF="$BUILD_BPF" \
-DBUILD_WARNINGS_AS_ERRORS="$BUILD_WARNINGS_AS_ERRORS" \
-DFALCO_VERSION="$FALCO_VERSION" \
-DDRAIOS_DEBUG_FLAGS="$DRAIOS_DEBUG_FLAGS" \
"$SOURCE_DIR/falco"
exit "$(printf '%d\n' $?)"
;;