cmake: Strip prefix from debug info
Paves the way for some extra reproducibility.pull/207/head
parent
38657f5d77
commit
c6b600d623
|
|
@ -95,6 +95,12 @@ add_compile_options(-g)
|
||||||
|
|
||||||
# optimizations
|
# optimizations
|
||||||
if(CMAKE_CROSSCOMPILING)
|
if(CMAKE_CROSSCOMPILING)
|
||||||
|
# Reproducible build support
|
||||||
|
add_link_options(-fdebug-prefix-map=${CMAKE_SOURCE_DIR}=)
|
||||||
|
add_link_options(-fdebug-prefix-map=${CMAKE_BINARY_DIR}=)
|
||||||
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "8")
|
||||||
|
add_compile_options(-ffile-prefix-map=${CMAKE_SOURCE_DIR}=)
|
||||||
|
endif()
|
||||||
|
|
||||||
# default optimization flags
|
# default optimization flags
|
||||||
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
|
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue