This is an archive of the discontinued LLVM Phabricator instance.

[clang] [Windows] Mark PIC as implicitly enabled for aarch64, just like for x86_64
ClosedPublic

Authored by mstorsjo on Oct 13 2021, 4:19 AM.

Details

Summary

This doesn't practically affect the code generation.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 13 2021, 4:19 AM
mstorsjo requested review of this revision.Oct 13 2021, 4:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 13 2021, 4:19 AM
MaskRay accepted this revision.Oct 13 2021, 9:29 AM

Looks great!

This revision is now accepted and ready to land.Oct 13 2021, 9:29 AM
MaskRay added inline comments.Oct 13 2021, 9:47 AM
clang/test/Driver/pic.c
322

perhaps change windows-pic.cpp instead

mstorsjo added inline comments.Oct 13 2021, 12:06 PM
clang/test/Driver/pic.c
322

That file actually doesn't test the thing that this patch touches (if I remove the existing cases for x86_64 in the modified functions, that test still passes but this one breaks), so I thought this one is a better fit, wrt what the test actually tests.

MaskRay added a comment.EditedOct 13 2021, 12:13 PM

I was thinking of when testing "windows" x "pic", whether the test should reside in "windows" or "pic".
If in "windows", we can decrease the number of RUN lines and use one RUN line to test multiple properties at one time.
If in "pic", it does make it clear what platforms default to pic but I think many platforms have dedicated tests and duplicate the coverage here anyway.

I was thinking of when testing "windows" x "pic", whether the test should reside in "windows" or "pic".
If in "windows", we can decrease the number of RUN lines and use one RUN line to test multiple properties at one time.
If in "pic", it does make it clear what platforms default to pic but I think many platforms have dedicated tests and duplicate the coverage here anyway.

True, but then again, this avoids needing to duplicate the PIC level checks across two files. It costs a couple more RUN lines, true...

Anyway, I'm not strongly opposed to restructuring it, but feel free to pick that up as a followup if you want to - I'd rather keep this one as-is.

I was thinking of when testing "windows" x "pic", whether the test should reside in "windows" or "pic".
If in "windows", we can decrease the number of RUN lines and use one RUN line to test multiple properties at one time.
If in "pic", it does make it clear what platforms default to pic but I think many platforms have dedicated tests and duplicate the coverage here anyway.

True, but then again, this avoids needing to duplicate the PIC level checks across two files. It costs a couple more RUN lines, true...

Anyway, I'm not strongly opposed to restructuring it, but feel free to pick that up as a followup if you want to - I'd rather keep this one as-is.

LG