[PATCH] Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a release tablegen build when LLVM is configured with assertions enabled.
Chris Bieneman
cbieneman at apple.com
Tue Mar 10 11:17:10 PDT 2015
I have no problem with incorporating Justin’s feedback, I inadvertently let this stall out, but I wanted to follow up with Reid about his feedback.
Reid,
While I do think we can cleanup the NDEBUG uses in Support, and we can maybe just assume some of those uses are okay, I think this is really fragile.
How would you feel about this if I took Duncan’s suggestion and instead of using CMAKE_CROSS_COMPILING directly I used a different variable to gate that functionality?
-Chris
> On Mar 10, 2015, at 10:22 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> Hi all,
>
> Gentle ping for this patch, as I find it very useful :)
>
> What’s the current status? Chris what do you think of Justin’s idea?
>
> —
> Mehdi
>
>
>> On Feb 9, 2015, at 2:27 PM, Justin Bogner <mail at justinbogner.com> wrote:
>>
>> Chris Bieneman <beanz at apple.com> writes:
>>> Hi resistor,
>>>
>>> This change leverages the cross-compiling functionality in the build
>>> system to build a release tablegen executable for use during the
>>> build.
>>>
>>> http://reviews.llvm.org/D7349
>>>
>>> Files:
>>> CMakeLists.txt
>>>
>>> Index: CMakeLists.txt
>>> ===================================================================
>>> --- CMakeLists.txt
>>> +++ CMakeLists.txt
>>> @@ -330,6 +330,11 @@
>>> set(DISABLE_LLVM_DYLIB_ATEXIT 1)
>>> endif()
>>>
>>> +option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
>>> +if(LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS)
>>> + set(CMAKE_CROSSCOMPILING ON)
>>> +endif()
>>> +
>>
>> Using CMAKE_CROSSCOMPILING for this is a bit confusing. I think it'd be
>> clearer to make a new variable, LLVM_USE_HOST_TOOLS (or so), and replace
>> our current uses of CMAKE_CROSSCOMPILING with it. Then we'd have
>> something like this:
>>
>> if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS))
>> set(LLVM_USE_HOST_TOOLS ON)
>> endif()
>>
>> I think this makes the intent a little clearer. WDYT?
>>
>> Regardless, this LGTM as long as it works for MSVC and Xcode and the like,
>> with or without my suggestion.
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list