commit | 1ad8898fd629d9d13d3aa24d4ac043df30ff0e99 | [log] [tgz] |
---|---|---|
author | Keith Smiley <keithbsmiley@gmail.com> | Fri Jan 31 09:12:25 2025 -0800 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Jan 31 09:13:01 2025 -0800 |
tree | ee83d2d8e3cf5eac566308fd651d6779de07ce99 | |
parent | 5027d4a64d9bf6b1de629035f1cac448eb64bc56 [diff] |
Make output_file variable optional Copybara Import from https://github.com/bazelbuild/rules_cc/pull/339 BEGIN_PUBLIC Make output_file variable optional (#339) There are use cases where callers attempt to get the command line flags for something without having an output file, which makes any feature that relies on this fail. For example: https://github.com/bazel-contrib/rules_foreign_cc/blob/2dd6fe2aee33bf1a931ac18e5090c5476a229a02/foreign_cc/private/cc_toolchain_util.bzl#L250-L254 Currently this is unused directly but will be used in later changes and must be optional to work correctly for this case. Closes #339 END_PUBLIC COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/339 from keith:ks/make-output_file-variable-optional 86ac5093e128f3f591ea42acae9f4a57bf0bd060 PiperOrigin-RevId: 721795506 Change-Id: I48f2580052d4f32f0c2c109a1e91758e934f1206
diff --git a/cc/toolchains/variables/BUILD b/cc/toolchains/variables/BUILD index d650708..bb06770 100644 --- a/cc/toolchains/variables/BUILD +++ b/cc/toolchains/variables/BUILD
@@ -325,7 +325,7 @@ "//cc/toolchains/actions:compile_actions", "//cc/toolchains/actions:strip", ], - type = types.file, + type = types.option(types.file), ) cc_variable(