From fe7bf0e7e522bd6c9c2f128a2c73018ae9d0d303 Mon Sep 17 00:00:00 2001 From: Reshabh Sharma Date: Mon, 5 Oct 2020 21:05:40 +0530 Subject: [PATCH] SWDEV-253557 Strip shared lib for release builds Change-Id: I79608406b3295c762a3781abd455bd63e6893dd4 [ROCm/clr commit: eac709a8a9587c4aa776ccfd2b20623fccbf0b73] --- projects/clr/rocclr/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/clr/rocclr/CMakeLists.txt b/projects/clr/rocclr/CMakeLists.txt index 9395558252..b51fb9cb03 100644 --- a/projects/clr/rocclr/CMakeLists.txt +++ b/projects/clr/rocclr/CMakeLists.txt @@ -234,6 +234,12 @@ if (UNIX) message(STATUS "Found: ${LIBNUMA}") endif() endif() + +# strip the shared lib for release build +if(CMAKE_BUILD_TYPE STREQUAL "Release" AND ${BUILD_SHARED_LIBS}) + add_custom_command(TARGET amdrocclr_static POST_BUILD COMMAND ${CMAKE_STRIP} $) +endif() + #comment out as it's not available in cmake 3.5 #if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if(NOT CMAKE_INSTALL_PREFIX)