Symbols created for merged external global variables have default
visibility. This can break programs when compiling with -Oz -fvisibility=hidden
as symbols that should be hidden will be exported at link time.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Makes sense.
llvm/test/CodeGen/AArch64/global-merge-hidden-minsize.ll | ||
---|---|---|
18 | Missing CHECK lines to verify the globals were actually merged. |
llvm/test/CodeGen/AArch64/global-merge-hidden-minsize.ll | ||
---|---|---|
18 | Added them. I wasn't sure if we needed to, since the command line is not asking for this specific optimization and the bug is just that we end up with wrong visibility. But I think I agree with you, better to fail if this case isn't merged so we can update the test. |
LGTM
llvm/test/CodeGen/AArch64/global-merge-hidden-minsize.ll | ||
---|---|---|
18 | Yes, the point of the extra CHECK lines is to ensure the test continues to test the transform in question. |
the CodeGen/AArch64/global-merge-hidden-minsize.ll test gets failed on aarch64 builder
http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/3704/steps/test-check-llvm/logs/FAIL%3A%20LLVM%3A%3Aglobal-merge-hidden-minsize.ll
with the following error:
error: unable to get target for 'arm-none-linux-gnu', see --version and --triple.
This is Aarch64 only builder without supporting for Arm32 triples. The test is inside Aarch64 specific test folder, but it also uses Arm32 triple.
Would you split this test and put the Arm32 specific part into CodeGen/ARM?
Thanks.
Vlad.
I've droped the arm triple from the test in 6be9acdfa814dee6c57833d5351137c72c11fbd3 and will cherry-pick that to 10.x as well.
Missing CHECK lines to verify the globals were actually merged.