Commit 452d5a57 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Update linux build flags for clang

parent 9347ce14
Pipeline #1057 passed with stages
in 7 minutes and 26 seconds
......@@ -192,7 +192,8 @@ pushd "$ABSL_SOURCE_DIR"
DEBUG_CXXFLAGS="$DEBUG_COMMON_FLAGS -std=c++17"
RELEASE_CXXFLAGS="$RELEASE_COMMON_FLAGS -std=c++17"
DEBUG_CPPFLAGS="-DPIC"
RELEASE_CPPFLAGS="-DPIC"
RELEASE_CPPFLAGS="-DPIC -D_FORTIFY_SOURCE=2"
COMMON_LDFLAGS="-fuse-ld=lld"
# Handle any deliberate platform targeting
if [ -z "${TARGET_CPPFLAGS:-}" ]; then
......@@ -212,16 +213,18 @@ pushd "$ABSL_SOURCE_DIR"
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_C_FLAGS="$DEBUG_CFLAGS" \
-DCMAKE_CXX_FLAGS="$DEBUG_CXXFLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$COMMON_LDFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$COMMON_LDFLAGS" \
-DCMAKE_INSTALL_PREFIX="$stage/absl/debug"
cmake --build . --config Release --parallel $AUTOBUILD_CPU_COUNT
cmake --build . --config Debug --parallel $AUTOBUILD_CPU_COUNT
# conditionally run unit tests
if [ "${DISABLE_UNIT_TESTS:-0}" = "0" ]; then
ctest -C Release
fi
cmake --install . --config Release
cmake --install . --config Debug
popd
# Release
......@@ -233,6 +236,8 @@ pushd "$ABSL_SOURCE_DIR"
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_C_FLAGS="$RELEASE_CFLAGS" \
-DCMAKE_CXX_FLAGS="$RELEASE_CXXFLAGS" \
-DCMAKE_SHARED_LINKER_FLAGS="$COMMON_LDFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$COMMON_LDFLAGS" \
-DCMAKE_INSTALL_PREFIX="$stage/absl/release"
cmake --build . --config Release --parallel $AUTOBUILD_CPU_COUNT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment