This is an archive of the discontinued LLVM Phabricator instance.

[AIX][compiler-rt] Fix cmake build of libatomic for cmake-3.16+
ClosedPublic

Authored by lkail on Jun 6 2021, 9:22 PM.

Details

Summary

cmake-3.16+ for AIX changes the default behavior of building a SHARED library which breaks AIX's build of libatomic, i.e., cmake-3.16+ builds SHARED as an archive of dynamic libraries. To fix it, we have to build libatomic.so.1 as MODULE which keeps libatomic.so.1 as an normal dynamic library.

Diff Detail

Event Timeline

lkail created this revision.Jun 6 2021, 9:22 PM
lkail requested review of this revision.Jun 6 2021, 9:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 6 2021, 9:22 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
lkail edited the summary of this revision. (Show Details)Jun 6 2021, 9:24 PM
lkail added a subscriber: llvm-commits.
jsji added inline comments.Jun 8 2021, 1:34 PM
compiler-rt/cmake/Modules/CompilerRTAIXUtils.cmake
20

Can we move the common flags up and add -Wl, -G only > 3.16?

compiler-rt/lib/builtins/CMakeLists.txt
771

Add comments about why we need to update BUILTIN_TYPE here.

lkail updated this revision to Diff 350815.Jun 9 2021, 1:40 AM

Address comments.

lkail marked 2 inline comments as done.Jun 9 2021, 1:40 AM
jsji accepted this revision as: jsji.Jun 9 2021, 6:22 AM

LGTM. Thanks.

This revision is now accepted and ready to land.Jun 9 2021, 6:22 AM
lkail updated this revision to Diff 351363.Jun 11 2021, 1:40 AM
lkail added a comment.Jun 11 2021, 1:42 AM

Removed F_LOADONLY flag to get symbols visible to binder.