From eac709a8a9587c4aa776ccfd2b20623fccbf0b73 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 --- rocclr/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rocclr/CMakeLists.txt b/rocclr/CMakeLists.txt index 9395558252..b51fb9cb03 100644 --- a/rocclr/CMakeLists.txt +++ b/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)