This is an archive of the discontinued LLVM Phabricator instance.

[clang][deps] Adapt test to be compatible when the assembler is called by default
ClosedPublic

Authored by Jake-Egan on Jan 25 2022, 8:15 AM.

Details

Summary

When -fno-integrated-as is in effect (the default on AIX) the cc1 job produces a .s file instead. This patch adapts the test to accept .s or .o files.

Diff Detail

Event Timeline

Jake-Egan requested review of this revision.Jan 25 2022, 8:15 AM
Jake-Egan created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 8:15 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Jake-Egan edited the summary of this revision. (Show Details)Jan 25 2022, 8:18 AM
Jake-Egan added reviewers: stevewan, jansvoboda11.
jansvoboda11 added inline comments.Jan 25 2022, 8:44 AM
clang/test/ClangScanDeps/headerwithdirname.cpp
16

Why is {{.*}} necessary?

Jake-Egan added inline comments.Jan 25 2022, 9:57 AM
clang/test/ClangScanDeps/headerwithdirname.cpp
16

It's to match the random characters between "input" and the file extension. The output on AIX looks like this:
/tmp/headerwithdirname_input-ffd608.s: \

stevewan added inline comments.Jan 27 2022, 11:49 AM
clang/test/ClangScanDeps/headerwithdirname.cpp
16

To be clear, this isn't AIX specific behaviour. We get the temp assembly file when -fno-integrated-as is on.

Maybe slightly more accurate is,

// CHECK: headerwithdirname_input{{\.o|.*\.s}}

Updated patch to use a more accurate check.

Fixed diff.

Jake-Egan marked an inline comment as done.Jan 27 2022, 12:53 PM
jansvoboda11 accepted this revision.Jan 28 2022, 12:09 AM

Thanks for the explanation and update. LGTM.

This revision is now accepted and ready to land.Jan 28 2022, 12:09 AM
This revision was landed with ongoing or failed builds.Jan 28 2022, 8:40 AM
This revision was automatically updated to reflect the committed changes.