diff options
author | pcloudy <pcloudy@google.com> | 2017-11-22 02:36:12 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2017-11-22 02:38:19 -0800 |
commit | cf7f20a682a26572d8ba5598dae863be68685952 (patch) | |
tree | 5c4c34164af505d41c1e94f3ad6e29e5bc978aeb /src/main/java/com | |
parent | 1b0872aac0874d29195b9b476a7bac64b63d9df6 (diff) |
Add system_provide attribute to cc_import rule
When system_provide attribute is 1, Bazel assumes the runtime shared library is provided by system.
RELNOTES: None
PiperOrigin-RevId: 176632326
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java index 5701549bea..298908bce1 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcImportRule.java @@ -60,6 +60,13 @@ public final class CcImportRule implements RuleDefinition { .orderIndependent() .direct_compile_time_input() .allowedFileTypes(CppFileTypes.CPP_HEADER)) + /*<!-- #BLAZE_RULE(cc_import).ATTRIBUTE(system_provide) --> + If true, it indicates the shared library required at runtime is provided by the system. In + this case, <code>interface_library</code> should be specified and + <code>shared_library</code> should be empty. + <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ + .add( + attr("system_provided", BOOLEAN)) /*<!-- #BLAZE_RULE(cc_import).ATTRIBUTE(alwayslink) --> If 1, any binary that depends (directly or indirectly) on this C++ precompiled library will link in all the object files archived in the static library, @@ -69,8 +76,7 @@ public final class CcImportRule implements RuleDefinition { provided by some service. <!-- #END_BLAZE_RULE.ATTRIBUTE -->*/ .add( - attr("alwayslink", BOOLEAN) - .nonconfigurable("value is referenced in an ImplicitOutputsFunction")) + attr("alwayslink", BOOLEAN)) .add(attr("data", LABEL_LIST).cfg(DATA) .allowedFileTypes(FileTypeSet.ANY_FILE) .dontCheckConstraints()) |