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)