This is an archive of the discontinued LLVM Phabricator instance.

[Driver][Ananas] -r: imply -nostdlib like GCC
ClosedPublic

Authored by brad on Apr 30 2022, 11:13 PM.

Details

Diff Detail

Event Timeline

brad created this revision.Apr 30 2022, 11:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 30 2022, 11:13 PM
Herald added a subscriber: StephenFan. · View Herald Transcript
brad requested review of this revision.Apr 30 2022, 11:13 PM
zhmu accepted this revision.May 1 2022, 9:30 AM
This revision is now accepted and ready to land.May 1 2022, 9:30 AM
MaskRay accepted this revision.May 1 2022, 10:19 AM
MaskRay added inline comments.
clang/test/Driver/ananas.c
20

Delete -no-canonical-prefixes

brad added inline comments.May 1 2022, 5:45 PM
clang/test/Driver/ananas.c
20

Why here and not with the other instances of this same test? I'm trying to understand what -no-canonical-prefixes does as I see this all over the place and it seems like it has something to do with expanding symlinks with relative paths.

MaskRay added inline comments.May 1 2022, 8:23 PM
clang/test/Driver/ananas.c
20

By default clang uses the dereferenced argv[0] to construct the -cc1 command line.

Many tests copy n paste -no-canonical-prefixes without a good reason.
-no-canonical-prefixes is only needed when writing clang -cc1 and %clang has a content hash name (e.g. in Google's internal lit runner; I think Sony does something similar).

However, it is usually sufficient to omit clang and check just -cc. These tests can omit -no-canonical-prefixes .

brad updated this revision to Diff 426327.May 1 2022, 9:26 PM

Updated with feedback.

This revision was landed with ongoing or failed builds.May 1 2022, 9:28 PM
This revision was automatically updated to reflect the committed changes.