This is an archive of the discontinued LLVM Phabricator instance.

COFF: When generating code for LTO, use static reloc model on 32-bit x86.
ClosedPublic

Authored by pcc on Oct 10 2017, 3:17 PM.

Details

Summary

This is because it usually results in more compact code, and because
there are also known code generation bugs when using the PIC model
(see PR34306).

Based on a patch by Carlo Kok.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Oct 10 2017, 3:17 PM
rnk accepted this revision.Oct 10 2017, 5:44 PM

lgtm, clang uses static as well:
$ clang -m32 -c t.c -### |& sed -e 's/" "/\n/g' | grep -A1 reloc
-mrelocation-model
static

This revision is now accepted and ready to land.Oct 10 2017, 5:44 PM
This revision was automatically updated to reflect the committed changes.