[PATCH] Make llvm-lto obey -relocation-model

Nick Tomlinson nick.tomlinson at arm.com
Mon Apr 14 06:51:27 PDT 2014


Hello

I’ve made the changed requested in the attached patch.

Thanks

From: mankeyrabbit at gmail.com [mailto:mankeyrabbit at gmail.com] On Behalf Of James Molloy
Sent: 14 April 2014 14:33
To: Nick Tomlinson
Cc: LLVM Commits
Subject: Re: [PATCH] Make llvm-lto obey -relocation-model

Hi Nick,

I have only a couple of pedantic nits;

+  case LTO_CODEGEN_PIC_MODEL_DEFAULT:
+    //already default
+    break;

It's convention in LLVM to have a space after the // and capitalise the first letter of the comment (it should read like prose).

+  //Make the relocation model obey -relocation-model

I'm not sure this comment actually adds value - it seems a comment-for-comment's-sake.

Other than that, LGTM. I'm not aware of any code owner for LTO (Bill Wendling is in CODE_OWNERS.txt for libLTO, but this is different) and this patch seems fairly trivial. So if you'll make the changes I requested and send a new version of the patch, I can commit it for you.

Cheers,

James

On 14 April 2014 13:40, Nick Tomlinson <nick.tomlinson at arm.com> wrote:
Hello

Currently, llvm-lto always emits position independent code, as this is
hard-coded behaviour. It therefore ignores -relocation-model. The attached
patch fixes this problem. I have also changed the default relocation model
to the LLVM default, rather than dynamic. This seemed the most sensible
thing to do now that llvm-lto allows explicit selection of relocation model.
Please could someone review it?

Many Thanks

p.s: My first attempt at sending this message failed, so just in case it
does appear later as a duplicate, that's why

_______________________________________________
llvm-commits mailing list
llvm-commits at cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-lto_relocmodel-2.patch
Type: application/octet-stream
Size: 2624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140414/dc830b6e/attachment.obj>


More information about the llvm-commits mailing list