Skip to content

Commit 208ec65

Browse files
committed
Set -fsanitize=undefined on CI.
Propagate CXXFLAGS correctly. Set CFLAGS in the same way.
1 parent 3bd0172 commit 208ec65

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/gha.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
cd ..
6262
6363
# build and test
64-
CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g" CXXFLAGS="-Werror -g" ${ACTION}
64+
CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g -fsanitize=undefined" CXXFLAGS="-Werror -g -fsanitize=undefined" ${ACTION}
6565
6666
linux:
6767
runs-on: ubuntu-18.04
@@ -172,7 +172,7 @@ jobs:
172172
fi
173173
174174
# build and test
175-
CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g" CXXFLAGS="-Werror -g" MSGPACK_SAN="${SAN}" ${ACTION}
175+
CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" GTEST_ROOT="${BASE}/usr" CFLAGS="-Werror -g -fsanitize=undefined" CXXFLAGS="-Werror -g -fsanitize=undefined" MSGPACK_SAN="${SAN}" ${ACTION}
176176
177177
windows:
178178
runs-on: windows-2019

ci/build_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ else
2525
export ARCH_FLAG="-m64"
2626
fi
2727

28-
cmake -DMSGPACK_32BIT=${BIT32} -DBUILD_SHARED_LIBS=${SHARED} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DCMAKE_CXX_FLAGS=${ARCH_FLAG} ..
28+
cmake -DMSGPACK_32BIT=${BIT32} -DBUILD_SHARED_LIBS=${SHARED} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DCMAKE_CXX_FLAGS="${ARCH_FLAG} ${CXXFLAGS}" -DCMAKE_C_FLAGS="${CFLAGS}" ..
2929

3030
ret=$?
3131
if [ $ret -ne 0 ]

0 commit comments

Comments
 (0)