[llvm-commits] [PATCH] Move --march, --mcpu, and --mattr to TargetMachine.cpp (issue199072)

Jeffrey Yasskin jyasskin at google.com
Thu Feb 4 15:31:26 PST 2010


On Wed, Feb 3, 2010 at 11:25 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Feb 2, 2010, at 7:03 PM, jyasskin at gmail.com wrote:
>
>> Reviewers: llvm-commits_cs.uiuc.edu,
>>
>> Message:
>> Please take a look. The current patch is at
>> http://codereview.appspot.com/download/issue199072_1.diff
>>
>> Description:
>> Both llc.cpp and JIT/TargetSelect.cpp defined these flags, meaning that
>> when I link all of LLVM's libraries into a single shared library, llc
>> crashes on startup with duplicate flag definitions.
>>
>> This patch moves the flag definitions into TargetMachine (which made
>> sense in my head, but the exact location doesn't really matter).
>
> I like the spirit of this patch, but it will cause tools (e.g. clang, which doesn't use the jit but does use targets) to get new options that they shouldn't.  Would it be possible to hoist the JIT command line options out into lli.cpp?
>

Sure. Done at http://codereview.appspot.com/download/issue199072_2002.diff
or http://codereview.appspot.com/199072.




More information about the llvm-commits mailing list