Page MenuHomePhabricator

[flang] Disable LTO when building the flang runtime

Authored by DavidTruby on Dec 14 2022, 5:38 AM.



When building the flang runtime if LTO is enabled the archive file
contains LLVM IR rather than object code. Currently flang is not
LTO aware so cannot link this file to compiled Fortran code.

This patch disables LTO when building the flang runtime to avoid
this issue.

Diff Detail

Event Timeline

DavidTruby created this revision.Dec 14 2022, 5:38 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Herald added a subscriber: inglorion. · View Herald Transcript
DavidTruby requested review of this revision.Dec 14 2022, 5:38 AM

Note: this doesn't actually make LTO builds work correctly. There appears to be a bug where LTO builds sometimes cause segmentation faults at flang runtime. This patch just allows LTO builds to build correctly.

tblah accepted this revision.Dec 14 2022, 5:48 AM

LGTM, thanks for fixing this!

This revision is now accepted and ready to land.Dec 14 2022, 5:48 AM
This revision was automatically updated to reflect the committed changes.