Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac: produce dSYM files correctly #1104

Merged
merged 1 commit into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tools/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down