From 84fa253ecdde7165fd6504d10400b8d008df4320 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Wed, 22 Jun 2016 17:31:15 -0700 Subject: [PATCH] Pass --build-id=sha1 to linker explicitly On some platforms, a build-id was not being added to native artifacts and we would like it to be present. Explicitly pass --build-id=sha1 to the linker. Fixes dotnet/coreclr#5796 Commit migrated from https://github.com/dotnet/coreclr/commit/faeb5bcf9f6b76827b658110b910eda8f0151518 --- src/coreclr/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index f105717..d20f520 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -363,7 +363,9 @@ elseif (CLR_CMAKE_PLATFORM_UNIX) endif(WIN32) if(CLR_CMAKE_PLATFORM_LINUX) - set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack") + set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--build-id=sha1") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--build-id=sha1") endif(CLR_CMAKE_PLATFORM_LINUX) #------------------------------------ -- 2.7.4