This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Build libLTO as MODULE rather than SHARED
ClosedPublic

Authored by daltenty on Jun 7 2021, 9:26 AM.

Details

Summary

On CMake versions greater that >= 3.16 on AIX, shared libraries are
created as archives (which is the normal form for the platform). However
plugins libraries which are passed directly to a executable, like
libLTO to the linker, are usual build as plain .so, so this patch
restores this behaviour for libLTO on AIX (and adjust the name if need be
to account for the fact that llvm_add_library likes to force an empty
name prefix on modules), so we end up with the expected libLTO.so

Diff Detail

Event Timeline

daltenty created this revision.Jun 7 2021, 9:26 AM
daltenty requested review of this revision.Jun 7 2021, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 7 2021, 9:26 AM
ormris removed a subscriber: ormris.Jun 7 2021, 4:07 PM
w2yehia added inline comments.Jun 8 2021, 10:32 AM
llvm/tools/lto/CMakeLists.txt
31

80 chars?

LGTM

llvm/tools/lto/CMakeLists.txt
23–24

can we loosen the condition to apply to all versions of cmake on AIX?

daltenty updated this revision to Diff 351183.Jun 10 2021, 8:15 AM
  • Address comments
daltenty marked an inline comment as done.Jun 10 2021, 8:16 AM
daltenty added inline comments.
llvm/tools/lto/CMakeLists.txt
23–24

Sure, this change shouldn't have a negative affect on older versions

w2yehia accepted this revision.Jun 10 2021, 8:32 AM
This revision is now accepted and ready to land.Jun 10 2021, 8:32 AM
This revision was landed with ongoing or failed builds.Jun 10 2021, 9:10 AM
This revision was automatically updated to reflect the committed changes.