This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Set up lto::Config properly for codegen in ThinLTO backends
ClosedPublic

Authored by tejohnson on Mar 30 2017, 1:43 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Mar 30 2017, 1:43 PM
This revision is now accepted and ready to land.Mar 30 2017, 4:47 PM
This revision was automatically updated to reflect the committed changes.
davide added a subscriber: davide.Apr 1 2017, 2:17 PM

clang -cc1 crashes if an invalid reloc model is passed (via -mreloc-model=), see https://bugs.llvm.org/show_bug.cgi?id=32490
I'm not sure if the bug was already there or this refactoring exposed it. Either way, I'm going to submit a patch to get this fixed.
Ideally, we shouldn't keep two codepath in sync (as we do already for getCodeModel(), but that's the status quo). I may decide to refactor the whole handling to avoid this sync issue, but that won't be today.

clang -cc1 crashes if an invalid reloc model is passed (via -mreloc-model=), see https://bugs.llvm.org/show_bug.cgi?id=32490
I'm not sure if the bug was already there or this refactoring exposed it. Either way, I'm going to submit a patch to get this fixed.
Ideally, we shouldn't keep two codepath in sync (as we do already for getCodeModel(), but that's the status quo). I may decide to refactor the whole handling to avoid this sync issue, but that won't be today.

Thanks for fixing. I don't think this refactoring would have affected this though, the non-ThinLTO backend changes were NFC, it is the same switch statement that was there before.