Skip to content

Commit

Permalink
Build: Emit paths in macros and debug sections relative to repo root
Browse files Browse the repository at this point in the history
To avoid including paths from the build environment in the binaries.
A step towards having reproducible builds.
  • Loading branch information
xTibor authored and awesomekling committed Oct 8, 2020
1 parent 9a82c22 commit b85af07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-shared")
#FIXME: -fstack-protector

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -g1 -fno-exceptions -fno-rtti -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy -Wno-expansion-to-defined")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffile-prefix-map=${CMAKE_SOURCE_DIR}=.")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -DSANITIZE_PTRS")
add_link_options(--sysroot ${CMAKE_BINARY_DIR}/Root)
Expand Down

0 comments on commit b85af07

Please sign in to comment.