Skip to content

Commit

Permalink
Enable build-id linker flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tobim committed Dec 7, 2020
1 parent 94a58f5 commit 97fbe7a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ option(VAST_STATIC_EXECUTABLE "Link VAST statically"
$ENV{VAST_STATIC_EXECUTABLE})
option(VAST_USE_JEMALLOC "Use jemalloc instead of libc malloc"
"${VAST_STATIC_EXECUTABLE}")
option(VAST_ENABLE_BUILDID
"Include a unique identifier into the elf notes section" ON)
cmake_dependent_option(
BUILD_SHARED_LIBS "Build shared libraries instead of static" ON
"NOT VAST_STATIC_EXECUTABLE" OFF)
Expand Down Expand Up @@ -238,6 +240,10 @@ endmacro ()
set(LDFLAGS "$ENV{LDFLAGS}")
set(ARFLAGS "$ENV{ARFLAGS}")

if (VAST_ENABLE_BUILDID)
string(APPEND LDFLAGS " -Wl,--build-id")
endif ()

set(CMAKE_CXX_STANDARD 17)

# Build-type specific flags.
Expand Down

0 comments on commit 97fbe7a

Please sign in to comment.