Skip to content

Commit 60bddb4

Browse files
authored
Enable build-ids for FoundationICU. (#55)
1 parent 5b6bcf1 commit 60bddb4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ option(BUILD_SHARED_LIBS "build shared libraries" ON)
2222
set(CMAKE_CXX_STANDARD 14)
2323
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2424

25+
include(CheckLinkerFlag)
26+
check_linker_flag(CXX "LINKER:--build-id=sha1" LINKER_SUPPORTS_BUILD_ID)
27+
2528
include(GNUInstallDirs)
2629

2730
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules)

icuSources/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ endif()
3131
set_target_properties(_FoundationICU PROPERTIES
3232
INSTALL_RPATH "$ORIGIN")
3333

34+
if(LINKER_SUPPORTS_BUILD_ID)
35+
target_link_options(_FoundationICU PRIVATE "LINKER:--build-id=sha1")
36+
endif()
37+
3438
# Copy Headers to known directory for direct client (XCTest) test builds
3539
file(COPY
3640
include/

0 commit comments

Comments
 (0)