This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][ZOS] Remove --whole-archive & --color-diagnostics
AbandonedPublic

Authored by zibi on Feb 23 2021, 11:58 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Summary

We need to remove both options --whole-archive and --color-diagnostics from the link step otherwise, we get link errors when building libc++ on z/OS.

Diff Detail

Event Timeline

zibi created this revision.Feb 23 2021, 11:58 AM
zibi requested review of this revision.Feb 23 2021, 11:58 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 23 2021, 11:58 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
zibi retitled this revision from We need to remove both options --whole-archive and --color-diagnostics from the link step otherwise, we get link errors when building libc++ on z/OS. to [SystemZ][ZOS] Remove --whole-archive & --color-diagnostics.Feb 23 2021, 11:59 AM
zibi edited the summary of this revision. (Show Details)
ldionne requested changes to this revision.Feb 24 2021, 7:21 AM
ldionne added inline comments.
libcxx/src/CMakeLists.txt
213

What's the issue with using --whole-archive on z/OS? Also, if you don't use --whole-archive, some symbols in libc++abi might not be available from the dylib you build, so you'll end up with a malfunctioning/incomplete libc++.

This revision now requires changes to proceed.Feb 24 2021, 7:21 AM
zibi marked an inline comment as done.Feb 24 2021, 8:50 AM
zibi added inline comments.
libcxx/src/CMakeLists.txt
213

Linker on z/OS does not support this option. When -Wl,--whole-archive is used the linker wants to include an object of that name and issues an error. Not sure if incomplete libc++ will apply to z/OS due to linker differences. If you know which symbol(s) might be missing let me know and I can check. Perhaps there is an existing test which will fail when those symbols are not present in libc++.

zibi marked an inline comment as done.Mar 2 2021, 6:04 PM

ping

zibi abandoned this revision.Feb 1 2022, 10:30 AM

After switching to a shared build we don't need these changes anymore.