diff options
author | 2016-08-16 14:07:57 +0000 | |
---|---|---|
committer | 2016-08-17 11:23:36 +0000 | |
commit | 35ae5e62a5fef2a3e38872ce58dd675faab98928 (patch) | |
tree | 0254fcc47982ca99f3bc0cd854a12bdca3521ef4 /src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java | |
parent | 114c62b5808af78ed78722682351a2d34ff1d0b6 (diff) |
Remove references to ARCHIVE_FILETYPES and ARCHIVE_LIBRARY_FILETYPES from our C++ rules (except from precondition checks)
--
MOS_MIGRATED_REVID=130396421
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java index 32e2b7b1a1..ece5cac44a 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java @@ -247,7 +247,7 @@ public abstract class Link { // TODO(bazel-team): Figure out if PicArchives are actually used. For it to be used, both // linkingStatically and linkShared must me true, we must be in opt mode and cpu has to be k8. return archiveType == ArchiveType.START_END_LIB - && ARCHIVE_FILETYPES.matches(linkerInput.getArtifact().getFilename()) + && linkerInput.getArtifactCategory() == ArtifactCategory.STATIC_LIBRARY && linkerInput.containsObjectFiles(); } @@ -327,7 +327,8 @@ public abstract class Link { // files - otherwise getObjectFiles returns null, which would lead to an NPE in // simpleLinkerInputs. boolean needMembersForLink = archiveType != ArchiveType.FAT - && ARCHIVE_LIBRARY_FILETYPES.matches(name) && inputLibrary.containsObjectFiles(); + && inputLibrary.getArtifactCategory() == ArtifactCategory.STATIC_LIBRARY + && inputLibrary.containsObjectFiles(); // True if we will pass the members instead of the original archive. boolean passMembersToLinkCmd = needMembersForLink |