Empty dSYMs on macOS with Strip Local Symbols (8.0.13+)

Hi JUCE Team,

since version 8.0.13, macOS Release builds with Strip Local Symbols enabled are producing nearly empty dSYM files, around 200 KB.

I believe this may be caused by the PACE-related change that sets DEPLOYMENT_POSTPROCESSING=NO and moves stripping into a post-build strip -x script. Previously, Xcode appeared to run dsymutil before stripping; now it seems the strip step may be happening before the dSYM is generated.

As a workaround, I patched Projucer’s StripTarget function so that dsymutil runs before strip:

const auto stripTarget = [&]
        {
            ScriptBuilder script;

            for (ConstConfigIterator config (*this); config.next();)
            {
                auto& xcodeConfig = static_cast<const XcodeBuildConfiguration&> (*config);

                if (! xcodeConfig.isStripLocalSymbolsEnabled())
                    continue;

                script.ifEqual ("${CONFIGURATION}", doubleQuoted (config->getName()),
                                ScriptBuilder{}
                                    .run ("dsymutil",
                                          doubleQuoted ("${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"),
                                          "-o",
                                          doubleQuoted ("${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"))
                                    .run ("strip", "-x",
                                          doubleQuoted ("${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"))
                                    .toString());
            }

            if (! script.isEmpty())
                target.addShellScriptBuildPhase ("Strip Target", script.toStringWithDefaultShellOptions());
        };

I’m not sure whether this is the correct fix so I’d appreciate your guidance on the best approach.

If you need any additional tests or logs from my side, I’d be happy to provide them. If possible, please let me know whether a fix can be added soon.

Thanks,
Samuele

1 Like