Skip to content

Commit

Permalink
read --build-id from root cmake project during linking (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattklein123 authored Aug 11, 2016
1 parent 6e98864 commit beb5405
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(common.cmake)
include(thirdparty.cmake)

# Setup build ID via the linker. Also, statically link GCC libraries to lock GCC version.
execute_process(COMMAND git rev-parse --sq HEAD OUTPUT_VARIABLE GIT_COMMIT WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
execute_process(COMMAND git -C ${CMAKE_SOURCE_DIR} rev-parse --sq HEAD OUTPUT_VARIABLE GIT_COMMIT WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--build-id=0x${GIT_COMMIT} -static-libstdc++ -static-libgcc ${ENVOY_EXE_EXTRA_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}")

include_directories(${PROJECT_SOURCE_DIR}/include)
Expand Down

0 comments on commit beb5405

Please sign in to comment.