From 1474b56e12134f433d2a129d11fa9cb95254b1d0 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Tue, 4 May 2021 09:55:07 -0700 Subject: [PATCH 1/2] Deployment postprocessing should be enabled only for release builds --- cmake/Platform/iOS/LYWrappers_ios.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/Platform/iOS/LYWrappers_ios.cmake b/cmake/Platform/iOS/LYWrappers_ios.cmake index 53783e5c0a..97b7c70d35 100644 --- a/cmake/Platform/iOS/LYWrappers_ios.cmake +++ b/cmake/Platform/iOS/LYWrappers_ios.cmake @@ -16,7 +16,9 @@ function(ly_apply_platform_properties target) set_target_properties(${target} PROPERTIES - XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING "YES" + XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=debug] "NO" + XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=profile] "NO" + XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=release] "YES" ) if(${target_type} STREQUAL "SHARED_LIBRARY") From b99d0fb36ad590cf27f1d4794bec3c13b4c46b93 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Tue, 4 May 2021 10:20:51 -0700 Subject: [PATCH 2/2] Move symbol stripping attributes to iOS configuration file --- cmake/Platform/iOS/Configurations_ios.cmake | 5 +++++ cmake/Platform/iOS/LYWrappers_ios.cmake | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmake/Platform/iOS/Configurations_ios.cmake b/cmake/Platform/iOS/Configurations_ios.cmake index aa935c853f..6522c6a098 100644 --- a/cmake/Platform/iOS/Configurations_ios.cmake +++ b/cmake/Platform/iOS/Configurations_ios.cmake @@ -41,6 +41,11 @@ endif() # Signing ly_set(CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS --deep) +# Symbol Stripping +ly_set(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=debug] "NO") +ly_set(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=profile] "NO") +ly_set(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=release] "YES") + # Generate scheme files for Xcode ly_set(CMAKE_XCODE_GENERATE_SCHEME TRUE) diff --git a/cmake/Platform/iOS/LYWrappers_ios.cmake b/cmake/Platform/iOS/LYWrappers_ios.cmake index 97b7c70d35..8da421ad5c 100644 --- a/cmake/Platform/iOS/LYWrappers_ios.cmake +++ b/cmake/Platform/iOS/LYWrappers_ios.cmake @@ -14,13 +14,6 @@ include(cmake/Platform/Common/LYWrappers_default.cmake) function(ly_apply_platform_properties target) get_target_property(target_type ${target} TYPE) - set_target_properties(${target} - PROPERTIES - XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=debug] "NO" - XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=profile] "NO" - XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=release] "YES" - ) - if(${target_type} STREQUAL "SHARED_LIBRARY") # Some projects use an "_" in their target name which is not allowed in a bundle identifier get_target_property(target_name ${target} NAME)