-
Notifications
You must be signed in to change notification settings - Fork 42
cc_binary: support .dSYM generation #402
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test similar to
apple_support/test/linking_tests.bzl
Lines 217 to 226 in af8d93a
dsym_test( | |
name = "{}_generate_dsym_test".format(name), | |
tags = [name], | |
expected_argv = [ | |
"-g", | |
"DSYM_HINT_LINKED_BINARY", | |
], | |
mnemonic = "ObjcLink", | |
target_under_test = "//test/test_data:macos_binary", | |
) |
nit: please run pre-commit to format the code with clang-format
I think the test failure here is related to this change, not 100% sure
Add support for generating a .dSYM file if this is requested using `--apple_generate_dsym`. This change contains the following patches: * Add `-fdebug-prefix-map` and `-oso_prefix` compiler and linker flags as in more recent Xcode versions (16E140) it would cause sandbox paths leaking into the linked binaries. * Add `DSYM_HINT` flags to be picked up by `wrapped_clang` to generate .dSYM bundles on request. * In `wrapped_clang.cc` make sure the linked binary is stripped after generating the .dSYM bundle first to make the .dSYM bundle contain useful information. Adopts recent changes in bazel to support .dSYM files (as part of fixing bazelbuild/bazel#16893).
2c041da
to
b800f37
Compare
i think this looks good but we need to wait for the bazel change to make sure this is the right path |
Add support for generating a .dSYM file if this is requested using
--apple_generate_dsym
. This change contains the following patches:DSYM_HINT
flags to be picked up bywrapped_clang
to generate .dSYM bundles on request.wrapped_clang.cc
make sure the linked binary is stripped after generating the .dSYM bundle first to make the .dSYM bundle contain useful information.Adopts changes in bazel to support .dSYM files (as part of fixing bazelbuild/bazel#16893).