Skip to content

Commit

Permalink
Only enable linkmap if the variable exists (#288)
Browse files Browse the repository at this point in the history
In rules_apple we've started using cc_common.link in 1 place, which
doesn't set this variable in bazel since this is an Apple specific
feature in bazel. This means if you try to link a intents stub binary
and pass `--objc_generate_linkmap` the link will fail. We don't care
about generating linkmaps for that binary anyways since it's just an
intermediate artifact, so this fixes that link. This has the downside
that this could hide issues and silently not create linkmaps for links
that should support them in the future.
  • Loading branch information
keith authored Nov 29, 2023
1 parent 157f550 commit cf5b18d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crosstool/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2295,6 +2295,7 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
"-Xlinker",
"%{linkmap_exec_path}",
],
expand_if_available = "linkmap_exec_path",
),
],
),
Expand Down

0 comments on commit cf5b18d

Please sign in to comment.