This is an archive of the discontinued LLVM Phabricator instance.

[clang] Update unit-tests after linker selection fix for *-msvc targets
AbandonedPublic

Authored by maxim-kuvyrkov on Mar 18 2021, 6:13 AM.

Details

Reviewers
asl
phosek
Summary

After https://reviews.llvm.org/D98493 clang driver for *-msvc target
uses linker from CLANG_DEFAULT_LINKER instead of hard-coded "link.exe".
Update unit-tests that expect link.exe linker to explicitly select it
via -fuse-ld=link, so that buildbots and other builds that set
-DCLANG_DEFAULT_LINKER=foobar don't fail these tests.

Diff Detail

Event Timeline

maxim-kuvyrkov requested review of this revision.Mar 18 2021, 6:13 AM
maxim-kuvyrkov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 18 2021, 6:13 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

@SureYeaah , does this fix your internal buildbot?

amyk added a subscriber: amyk.Mar 18 2021, 2:44 PM

Hi,

Thanks for fixing the tests. I've tested this patch on the environment of clang-ppc64le-rhel (https://lab.llvm.org/buildbot/#/builders/57), and there seems to be two failures that still remain:

Failed Tests (2):
  Clang :: OpenMP/linking.c
  Clang :: Driver/msvc-link.c

OpenMP/linking.c fails on:

Exit Code: 1

Command Output (stderr):
--
/home/docker/amy/llvm-project/clang/test/OpenMP/linking.c:106:25: error: CHECK-MSVC-ILINK-64: expected string not found in input
// CHECK-MSVC-ILINK-64: link.exe

Driver/msvc-link.c fails on:

Exit Code: 1

Command Output (stderr):
--
/home/docker/amy/llvm-project/clang/test/Driver/msvc-link.c:10:9: error: DLL: expected string not found in input
// DLL: link.exe"

Added more fixes to OpenMP/linking.c and Driver/msvc-link.c .

Hi @amyk , thanks for testing -- I've updated two more places, which I missed on the first go. Would you please test the new version?

Also, D98862 was reverted so you need to apply it manually.

Thanks!

phosek accepted this revision.Mar 19 2021, 1:55 AM
phosek added a subscriber: phosek.

I've tested this locally and it's working for us.

This revision is now accepted and ready to land.Mar 19 2021, 1:55 AM