diff --git a/CMakeLists.txt b/CMakeLists.txt index fd983a16a..b575cb8d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4723,6 +4723,11 @@ if (GUI) endif() if (GUI_FLAVOUR STREQUAL "cocoa") + # handle with empty dsymutil output + # see https://reviews.llvm.org/D84565 + if (LTO) + target_link_options(${APP_NAME} PRIVATE "-Wl,-object_path_lto,${CMAKE_BINARY_DIR}/lto_tmp") + endif() # Handle the Storyboard ourselves if(NOT ${CMAKE_GENERATOR} MATCHES "^Xcode.*") # Compile the storyboard file with the ibtool. diff --git a/tools/build.go b/tools/build.go index 7b3ddc681..c5259d3e1 100644 --- a/tools/build.go +++ b/tools/build.go @@ -1642,11 +1642,11 @@ func postStateStripBinaries() { cmdRun([]string{objcopy, "--add-gnu-debuglink=" + getAppName() + ".dbg", getAppName()}, false) } else if systemNameFlag == "darwin" { cmdRun([]string{"dsymutil", filepath.Join(getAppName(), "Contents", "MacOS", APPNAME), - "--statistics", "--papertrail", "-o", getAppName() + ".dSYM"}, false) + "--statistics", "--update", "-o", getAppName() + ".dSYM"}, false) cmdRun([]string{"strip", "-S", "-x", "-v", filepath.Join(getAppName(), "Contents", "MacOS", APPNAME)}, false) } else if systemNameFlag == "ios" { cmdRun([]string{"dsymutil", filepath.Join(getAppName(), APPNAME), - "--statistics", "--papertrail", "-o", getAppName() + ".dSYM"}, false) + "--statistics", "--update", "-o", getAppName() + ".dSYM"}, false) cmdRun([]string{"strip", "-S", "-x", "-v", filepath.Join(getAppName(), APPNAME)}, false) } else { glog.Warningf("not supported in platform %s", systemNameFlag)