This is an archive of the discontinued LLVM Phabricator instance.

be more specific when testing for no fuse-ld warnings
AbandonedPublic

Authored by stuij on Sep 30 2020, 6:29 AM.

Details

Reviewers
MaskRay
dmgreen
Summary

This test, introduced in https://reviews.llvm.org/D87837, broke for our toolchain as this test triggered unrelated warnings. Being more specific about not expecting fuse-ld warnings won't invalidate the test, while playing a bit nicer with possible unrelated features.

Diff Detail

Event Timeline

stuij created this revision.Sep 30 2020, 6:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 30 2020, 6:29 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
stuij requested review of this revision.Sep 30 2020, 6:29 AM
stuij updated this revision to Diff 295262.Sep 30 2020, 6:35 AM

slight change in commit message

stuij edited the summary of this revision. (Show Details)Sep 30 2020, 6:38 AM
stuij added reviewers: MaskRay, dmgreen.
stuij edited the summary of this revision. (Show Details)
stuij edited the summary of this revision. (Show Details)

In the past we have usually disabled the downstream warning for similar catch-all warning lines.

clang/test/Driver/fuse-ld.c
5

This line has a = on the end. Would the other warning below also have that? (Negative tests are often tricky).

(Not that I'm against this, either way sounds fine to me)

MaskRay added inline comments.Oct 1 2020, 10:07 AM
clang/test/Driver/fuse-ld.c
15

How does this line trigger unrelated warnings? Can you dump it?

stuij added a comment.Oct 7 2020, 10:21 AM

Hi @MaskRay. Yes, so we're seeing a warning specific to our Armcompiler toolchain, so I'm guessing that isn't relevant to OSS LLVM:
armclang: warning: '--target=x86_64-unknown-linux' is not supported.

As David Green pointed out, we have a perfectly fine workaround. But I figured that a similar situation might crop up in OSS LLVM, and this way the test is a bit more future proof, and we might spare some future head-scratching.

However I feel bad already for wasting our time with such a minor change. Feel free to reject it :)

clang/test/Driver/fuse-ld.c
15

see my top-level comment

stuij abandoned this revision.Oct 27 2020, 6:32 AM

Abandoned because lack of reaction for such an unimportant issue.

Hi @MaskRay. Yes, so we're seeing a warning specific to our Armcompiler toolchain, so I'm guessing that isn't relevant to OSS LLVM:
armclang: warning: '--target=x86_64-unknown-linux' is not supported.

The test uses '-###' and nothing related to X86 backend (-DLLVM_TARGETS_TO_BUILD does not include X86), so the intention may be quetionable.

As David Green pointed out, we have a perfectly fine workaround. But I figured that a similar situation might crop up in OSS LLVM, and this way the test is a bit more future proof, and we might spare some future head-scratching.

If this cannot be reproduced with the OSS LLVM, I am not sure you should adjust such a test.

clang/test/Driver/fuse-ld.c
15

The impoerant bit is that the original message disallows any warning. The new message with an incorrect 'fuse-ld' (instead of '-fuse-ld') seems really questionable.

stuij added a comment.Oct 27 2020, 9:46 AM

If this cannot be reproduced with the OSS LLVM, I am not sure you should adjust such a test.

Ok, fair enough. Thanks for the comment.

clang/test/Driver/fuse-ld.c
15

Ai, a typo :(