From bd2da6e977172398bb6612c3a45e91fd1192961a Mon Sep 17 00:00:00 2001 From: Brentley Jones Date: Tue, 19 Mar 2024 01:45:23 -0700 Subject: [PATCH] Declare support for `gcc_quoting_for_param_files` feature in Unix cc_toolchain This was missed with a9e5a32b9c0de2ade15be67bd1b80c3ec8e6b472. Without this change, `gcc_quoting_for_param_files` does nothing, because `FeatureConfiguration.isEnabled()` will always return false. Without `gcc_quoting_for_param_files`, linking can fail for files with spaces in them. Closes #21699. PiperOrigin-RevId: 617092387 Change-Id: Ifcd4378d2120e2e75e2e72a4b0059b41ba5ce833 --- tools/cpp/unix_cc_toolchain_config.bzl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/cpp/unix_cc_toolchain_config.bzl b/tools/cpp/unix_cc_toolchain_config.bzl index 4217e4688485b5..35e2c64ad5e20e 100644 --- a/tools/cpp/unix_cc_toolchain_config.bzl +++ b/tools/cpp/unix_cc_toolchain_config.bzl @@ -218,6 +218,11 @@ def _impl(ctx): enabled = True, ) + gcc_quoting_for_param_files_feature = feature( + name = "gcc_quoting_for_param_files", + enabled = True, + ) + static_link_cpp_runtimes_feature = feature( name = "static_link_cpp_runtimes", enabled = False, @@ -1419,6 +1424,7 @@ def _impl(ctx): asan_feature, tsan_feature, ubsan_feature, + gcc_quoting_for_param_files_feature, static_link_cpp_runtimes_feature, ] + ( [ @@ -1459,6 +1465,7 @@ def _impl(ctx): asan_feature, tsan_feature, ubsan_feature, + gcc_quoting_for_param_files_feature, static_link_cpp_runtimes_feature, ] + ( [