This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Support Solaris/amd64 GetTls
ClosedPublic

Authored by ro on Feb 15 2022, 4:13 AM.

Details

Summary

This is the driver part of D91605, a workaround to allow direct calls to __tls_get_addr on Solaris/amd64.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

This adds a testcase to the original submission.

Diff Detail

Event Timeline

ro created this revision.Feb 15 2022, 4:13 AM
ro requested review of this revision.Feb 15 2022, 4:13 AM
MaskRay accepted this revision.Feb 17 2022, 11:26 AM
MaskRay added inline comments.
clang/test/Driver/solaris-ld-sanitizer.c
2

Optional: some folks prefer an alternative comment marker (/// for C, ## for assembly, etc) for non-RUN non-CHECK comments. It makes the comments stand out (they may render differently in an editor). Many tests have check-prefix typos and if we teach lit or FileCheck to catch such typos, we can let them skip /// lines to avoid false positives.

7

Remove -no-canonical-prefixes . See some cleanup advice on D119309.

This revision is now accepted and ready to land.Feb 17 2022, 11:26 AM
ro marked 2 inline comments as done.Feb 18 2022, 2:18 AM
ro added inline comments.
clang/test/Driver/solaris-ld-sanitizer.c
2

Seems quite sensible: patch amended.

7

Done, as well as -o %t.o.

ro updated this revision to Diff 409881.Feb 18 2022, 2:18 AM
ro marked 2 inline comments as done.

Test fixes as per review comments.

MaskRay accepted this revision.Feb 18 2022, 1:27 PM
MaskRay added inline comments.
clang/test/Driver/solaris-ld-sanitizer.c
7

The first line is now shorter. You can move --target= above.

For me, the number of lines of a test counts and sometimes compacter RUN lines improve readability.

ro added inline comments.Feb 19 2022, 5:51 AM
clang/test/Driver/solaris-ld-sanitizer.c
7

Depends: on long lines, crucial information can be harder to find. I moved --target= up, but kept the distinguishing -m64/-fsanitize= in front. Unfortunately, that causes some of the lines to be longer than 80 characters.

However, the --gcc-toolchain= and --sysroot= lines could easily be joined.

ro updated this revision to Diff 410083.Feb 19 2022, 5:51 AM

Testcase formatting improvements.

This revision was automatically updated to reflect the committed changes.