[PATCH] D92633: Add -f[no-]direct-access-external-data to deprecate -mpie-copy-relocations
Sriraman Tallam via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 13:48:14 PST 2020
tmsriram added a comment.
In D92633#2434766 <https://reviews.llvm.org/D92633#2434766>, @MaskRay wrote:
> In D92633#2434714 <https://reviews.llvm.org/D92633#2434714>, @tmsriram wrote:
>
>> Correct me if I am wrong, but I do see that this behavior is touched. Line 10 in -fdirect-access-external-data.c :
>>
>> // RUN: %clang -### -c -target aarch64 %s -fpic -fdirect-access-external-data 2>&1 | FileCheck %s --check-prefix=DIRECT
>>
>> With -fpic, the variable access will go directly and not via GOT.
>
> `clang/test/Driver/fdirect-access-external-data.c` is a driver test which tests how the driver passes options to CC1.
> `clang/lib/CodeGen/CodeGenModule.cpp` says how the CC1 option affects the dso_local specifier in the LLVM IR output. Currently it is a no op for -fpic/-fPIC.
Great! Sorry I didnt realize this, this is fine with me now!
> (I have made some tests. It looks like implementing -fno-direct-access-external-data for -fno-pic is not an insurmountable work: ~50 tests)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92633/new/
https://reviews.llvm.org/D92633
More information about the cfe-commits
mailing list