add dependency_file_feature on macos features#22717
Closed
PikachuHyA wants to merge 1 commit intobazelbuild:masterfrom
Closed
add dependency_file_feature on macos features#22717PikachuHyA wants to merge 1 commit intobazelbuild:masterfrom
PikachuHyA wants to merge 1 commit intobazelbuild:masterfrom
Conversation
comius
approved these changes
Jun 14, 2024
copybara-service Bot
pushed a commit
that referenced
this pull request
Jun 14, 2024
This patch adds `compiler_input_flags_feature` and `compiler_output_flags_feature` to the features. follow #22717 By default, the features `compiler_input_flags_feature` and `compiler_output_flags_feature` are included through `CppActionConfigs.java` in the `getFeaturesToAppearLastInFeaturesList` method. For reference, see the relevant code here: https://github.com/bazelbuild/bazel/blob/0dbfaccaf5bee5ea7f11c01db1fc0cd1ca7f3810/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java#L1513-L1573 ## Background I modified `tools/cpp/unix_cc_toolchain_config.bzl` and found no input and output on macOS when testing #19940 with the new action names `c++20-deps-scanning` and `c++20-module-compile`. As discussed in #22429 (comment), I added these two features to `unix_cc_toolchain_config.bzl`. the Windows toolchains already have these features, so no modifications were necessary for `windows_cc_toolchain_config.bzl`. - Windows input flags: https://github.com/bazelbuild/bazel/blob/786a893ef6f69a8f77ca008a478bf67abfdcdc57/tools/cpp/windows_cc_toolchain_config.bzl#L1073-L1095 - Windows output flags: https://github.com/bazelbuild/bazel/blob/786a893ef6f69a8f77ca008a478bf67abfdcdc57/tools/cpp/windows_cc_toolchain_config.bzl#L960-L1020 cc @comius Closes #22743. PiperOrigin-RevId: 643345702 Change-Id: I5715d25e12c7a3616d1fdb484f77ef7cd0fd1bba
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch add
dependency_file_featureto features when OS is macos.the feature
dependency_file_featureadded by default throughCppActionConfigs.java getLegacyFeaturesbazel/src/main/java/com/google/devtools/build/lib/rules/cpp/CppActionConfigs.java
Lines 93 to 117 in 0dbfacc
Background
I modified
tools/cpp/unix_cc_toolchain_config.bzland founddependency_filenot work on MacOS when testing #19940 with new action namec++20-deps-scanningandc++20-module-compile. After addingdependency_file_featureto features, it works.cc @comius