aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
diff options
context:
space:
mode:
authorGravatar Lukacs Berki <lberki@google.com>2016-08-16 14:49:33 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-08-17 11:23:41 +0000
commit7c63f15e516f240b3ecc1642ae717e3b029dcfa6 (patch)
tree2c94b8bdc1f511ada111a4f17e2d7022a07f9cfe /src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
parent35ae5e62a5fef2a3e38872ce58dd675faab98928 (diff)
Differentiate between regular and alwayslink static libraries in LinkerInput#getArtifactCategory() and use this information to remove one use of LINK_LIBRARY_FILETYPES.
-- MOS_MIGRATED_REVID=130400793
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
index 9f3e215dac..d4346a39e1 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LinkerInputs.java
@@ -251,8 +251,12 @@ public abstract class LinkerInputs {
Iterable<Artifact> ltoBitcodeFiles) {
String basename = libraryArtifact.getFilename();
switch (category) {
+ case ALWAYSLINK_STATIC_LIBRARY:
+ Preconditions.checkState(Link.LINK_LIBRARY_FILETYPES.matches(basename));
+ break;
+
case STATIC_LIBRARY:
- Preconditions.checkState(Link.ARCHIVE_LIBRARY_FILETYPES.matches(basename));
+ Preconditions.checkState(Link.ARCHIVE_FILETYPES.matches(basename));
break;
case DYNAMIC_LIBRARY: