Skip to content

Commit

Permalink
Merge pull request #102 from aws/harden_cf
Browse files Browse the repository at this point in the history
Harden credentials-fetcher
  • Loading branch information
saikiranakula-amzn authored Jan 9, 2024
2 parents 21c16bf + 344487f commit 0e89bd0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ include(GNUInstallDirs)

set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

set(CMAKE_CXX_FLAGS " -std=c++17 -g -Wall -Werror -pthread")
set(CFLAGS "${CFLAGS} -std=c++17 -Wall -fstack-protector-all -pthread")
set(CFLAGS "${CFLAGS} -Wl,--strip-all -Wformat -Wformat-security")
set(CFLAGS "${CFLAGS} -fstack-clash-protection -fPIE -fPIC")
set(CFLAGS "${CFLAGS} -O2 -D_FORTIFY_SOURCE=2")
set(CMAKE_CXX_FLAGS ${CFLAGS})
set(CMAKE_EXE_LINKER_FLAGS "${LDFLAGS} -z noexecstack -z relro -z now")
set(CMAKE_SHARED_LINKER_FLAGS "${LDFLAGS} -z noexecstack -z relro -z now")

set(protobuf_MODULE_COMPATIBLE TRUE)
find_package(Protobuf REQUIRED)
Expand Down

0 comments on commit 0e89bd0

Please sign in to comment.