From 35ae5e62a5fef2a3e38872ce58dd675faab98928 Mon Sep 17 00:00:00 2001 From: Lukacs Berki Date: Tue, 16 Aug 2016 14:07:57 +0000 Subject: Remove references to ARCHIVE_FILETYPES and ARCHIVE_LIBRARY_FILETYPES from our C++ rules (except from precondition checks) -- MOS_MIGRATED_REVID=130396421 --- src/main/java/com/google/devtools/build/lib/rules/cpp/Link.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/google/devtools/build') 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 -- cgit v1.2.3