This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Enable -z defs on Solaris
ClosedPublic

Authored by ro on Jul 26 2022, 7:22 AM.

Details

Summary

I wondered why I hadn't seen the link failures in D130571 on Solaris/sparcv9 and found that Solaris, unlike Linux, doesn't use -Wl,-z,defs when linking shared objects. The three affected shared objects indeed have undefined references to several 64-bit atomics.

This patch will expose such issues in the future by defaulting to -Wl,-z,defs on Solaris, as recommended in ld(1).

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

Diff Detail

Event Timeline

ro created this revision.Jul 26 2022, 7:22 AM
ro requested review of this revision.Jul 26 2022, 7:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2022, 7:22 AM
MaskRay accepted this revision.Jul 26 2022, 6:13 PM
This revision is now accepted and ready to land.Jul 26 2022, 6:13 PM
This revision was landed with ongoing or failed builds.Jul 27 2022, 3:34 AM
This revision was automatically updated to reflect the committed changes.