This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common] Use GetStaticTlsBoundary on Solaris 11.4

Authored by ro on Feb 17 2022, 5:42 AM.



This is a restricted alternative to D91605 which only works on Solaris 11.4 SRU 10+, but would break the build on Solaris 11.3 and Illumos which lack dlpi_tls_modid.

Apart from that, the patch is trivial. One caveat is that the sanitizer_common and asan tests need to be linked explicitly with ld -z relax=transtls on Solaris/amd64 since the archives with calls to __tls_get_addr are linked in directly.

Tested on amd64-pc-solaris2.11, sparcv9-sun-solaris2.11, and x86_64-pc-linux-gnu.

Diff Detail

Event Timeline

ro created this revision.Feb 17 2022, 5:42 AM
ro requested review of this revision.Feb 17 2022, 5:42 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptFeb 17 2022, 5:42 AM
MaskRay accepted this revision.Feb 22 2022, 10:30 AM


This revision is now accepted and ready to land.Feb 22 2022, 10:30 AM
This revision was landed with ongoing or failed builds.Feb 22 2022, 11:19 AM
This revision was automatically updated to reflect the committed changes.