strip -x should do it but for minimal binary size and symbol exposure, I recommend checking these options as well:
GCC_GENERATE_DEBUGGING_SYMBOLS GCC_INLINES_ARE_PRIVATE_EXTERN GCC_SYMBOLS_PRIVATE_EXTERN
So I guess my question should be, is it necessary to call strip later or it should be enough to configure Xcode with the right flags?
I’m getting the following error when I call strip -x on vst , vst3 and the app:
fatal error: file not in an order that can be processed (link edit information does not fill the __LINKEDIT segment): /xxx/Release/xxx.app/Contents/MacOS/xxx](xxx.app/Contents/MacOS/xxx)(for architecture x86_64)
I have “Strip Local Symbols” enabled in the Projucer project. Would you recommend me to add anything else in “Custom Xcode Flags”?
GCC_INLINES_ARE_PRIVATE_EXTERN = YES,
GCC_SYMBOLS_PRIVATE_EXTERN = YES
At Cmake strip plugin binaries the following flags are also suggested. Any experiences with these ones?
XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING = YES,
XCODE_ATTRIBUTE_STRIP_INSTALLED_PRODUCT = YES
PS: Feel free to PM if you want to keep your settings private.
For the macOS release build, I have it working with the following flags in my cmake project:
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")
set (CMAKE_XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] "YES")
set (CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Release] "dwarf-with-dsym")
set (CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=Release] "YES")
and strip the symbols as a post build action with strip -x ${PRODUCT_NAME}.${artifact_extension}/Contents/MacOS/${PRODUCT_NAME}.
Can’t remember why but also had to disable the copy plugin after build option for the release build so it does not interfere with the symbols stuff.