diff options
author | hlopko <hlopko@google.com> | 2018-02-01 08:07:00 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-01 08:08:57 -0800 |
commit | 186068f8e2afcfcbb3e15f8791a7df0407217483 (patch) | |
tree | 669a97a29628d0756c804dd0f9231406f4fc0dab /src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java | |
parent | a904b85376251775d58852a0e8480c0db032bac8 (diff) |
Automated rollback of commit aa8ce5653f92473b331e500a3614245dae38dfc4.
*** Reason for rollback ***
Breaks //third_party/msvc crosstool
*** Original change description ***
RELNOTES: Fix how libraries to link is specified to archiver actions.
start-lib/end-lib should not be passed to ar. Fix how the libraries to link are passed to ar by not using the generic feature "libraries_to_link"
PiperOrigin-RevId: 184140734
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java index a6bda43c08..36c2daa8ae 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionTest.java @@ -728,56 +728,4 @@ public class CppLinkActionTest extends BuildViewTestCase { verifyArguments( linkAction.getCommandLine(expander), treeFileArtifactsPaths, treeArtifactsPaths); } - - @Test - public void testStaticLinking() throws Exception { - ImmutableList<LinkTargetType> targetTypesToTest = - ImmutableList.of( - LinkTargetType.STATIC_LIBRARY, - LinkTargetType.PIC_STATIC_LIBRARY, - LinkTargetType.ALWAYS_LINK_STATIC_LIBRARY, - LinkTargetType.ALWAYS_LINK_PIC_STATIC_LIBRARY); - - Artifact testTreeArtifact = createTreeArtifact("library_directory"); - - TreeFileArtifact library0 = ActionInputHelper.treeFileArtifact(testTreeArtifact, "library0.o"); - TreeFileArtifact library1 = ActionInputHelper.treeFileArtifact(testTreeArtifact, "library1.o"); - - ArtifactExpander expander = - (artifact, output) -> { - if (artifact.equals(testTreeArtifact)) { - output.add(library0); - output.add(library1); - } - }; - - Artifact objectFile = scratchArtifact("objectFile.o"); - - for (LinkTargetType linkType : targetTypesToTest) { - - scratch.deleteFile("dummyRuleContext/BUILD"); - Artifact output = scratchArtifact("output." + linkType.getExtension()); - - CppLinkActionBuilder builder = - createLinkBuilder( - linkType, - output.getExecPathString(), - ImmutableList.<Artifact>of(), - ImmutableList.<LibraryToLink>of(), - getMockFeatureConfiguration()) - .setLibraryIdentifier("foo") - .addObjectFiles(ImmutableList.of(testTreeArtifact)) - .addObjectFile(objectFile) - // Makes sure this doesn't use a params file. - .setFake(true); - - CppLinkAction linkAction = builder.build(); - assertThat(linkAction.getCommandLine(expander)) - .containsAllOf( - library0.getExecPathString(), - library1.getExecPathString(), - objectFile.getExecPathString()) - .inOrder(); - } - } } |