Skip to content

Commit

Permalink
Add objcpp_compile to cpp_compile_actions
Browse files Browse the repository at this point in the history
Copybara Import from bazelbuild#334

BEGIN_PUBLIC
Add objcpp_compile to cpp_compile_actions (bazelbuild#334)

This mirrors bazel's behavior of passing any `--cxxopt` flags through to
ObjC++ compile actions:

https://github.com/bazelbuild/bazel/blob/1e9c127d9dff47b7f904d296f2c1accf0aa1ba87/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationHelper.java#L1265-L1271

Closes bazelbuild#334
END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=bazelbuild#334 from keith:ks/add-objcpp_compile-to-cpp_compile_actions a0e5a65
PiperOrigin-RevId: 725173677
Change-Id: I0a0305f362992b90cc2f9e276b6b44b7a246fa7a
  • Loading branch information
keith authored and copybara-github committed Feb 10, 2025
1 parent a116227 commit 4402ded
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cc/action_names.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ ALL_CPP_COMPILE_ACTION_NAMES = [
ACTION_NAMES.cpp_module_codegen,
ACTION_NAMES.lto_backend,
ACTION_NAMES.clif_match,
ACTION_NAMES.objcpp_compile,
]

# Names of actions that parse or compile C, C++ and assembly code.
ALL_CC_COMPILE_ACTION_NAMES = ALL_CPP_COMPILE_ACTION_NAMES + [
ACTION_NAMES.c_compile,
ACTION_NAMES.preprocess_assemble,
ACTION_NAMES.assemble,
ACTION_NAMES.objc_compile,
]

# Names of actions that link C, C++ and assembly code.
Expand All @@ -168,6 +170,7 @@ ALL_CC_LINK_ACTION_NAMES = [
CC_LINK_EXECUTABLE_ACTION_NAMES = [
ACTION_NAMES.cpp_link_executable,
ACTION_NAMES.lto_index_for_executable,
ACTION_NAMES.objc_executable,
]

# Names of actions that link dynamic libraries.
Expand Down
1 change: 1 addition & 0 deletions cc/toolchains/actions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ cc_action_type_set(
":cpp_module_codegen",
":lto_backend",
":clif_match",
":objcpp_compile",
],
)

Expand Down

0 comments on commit 4402ded

Please sign in to comment.