[PATCH] Add new LLVM_OPTIMIZED_TABLEGEN build setting which configures, builds and uses a release tablegen build when LLVM is configured with assertions enabled.
Mehdi Amini
mehdi.amini at apple.com
Tue Mar 10 10:22:30 PDT 2015
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
More information about the llvm-commits
mailing list