[llvm-commits] [polly] r153439 - /polly/trunk/CMakeLists.txt

Tobias Grosser tobias at grosser.es
Mon Mar 26 08:36:16 PDT 2012


On 03/26/2012 05:33 PM, Hongbin Zheng wrote:
> On Mon, Mar 26, 2012 at 11:24 PM, Tobias Grosser<tobias at grosser.es>  wrote:
>> On 03/26/2012 05:16 PM, Hongbin Zheng wrote:
>>>
>>> Author: ether
>>> Date: Mon Mar 26 10:16:29 2012
>>> New Revision: 153439
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=153439&view=rev
>>> Log:
>>> Out-of-tree build: Load the configuration of the installed llvm.
>>>
>>> Modified:
>>>      polly/trunk/CMakeLists.txt
>>>
>>> Modified: polly/trunk/CMakeLists.txt
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/polly/trunk/CMakeLists.txt?rev=153439&r1=153438&r2=153439&view=diff
>>>
>>> ==============================================================================
>>> --- polly/trunk/CMakeLists.txt (original)
>>> +++ polly/trunk/CMakeLists.txt Mon Mar 26 10:16:29 2012
>>> @@ -20,23 +20,8 @@
>>>     # Add the llvm header path.
>>>     include_directories(${LLVM_INSTALL_ROOT}/include/)
>>>
>>> -  # Get the system librarys that will link into LLVM.
>>> -  function(get_system_libs return_var)
>>> -    # Returns in `return_var' a list of system libraries used by LLVM.
>>> -    if( NOT MSVC )
>>> -      if( MINGW )
>>> -        set(system_libs ${system_libs} imagehlp psapi)
>>> -      elseif( CMAKE_HOST_UNIX )
>>> -        if( HAVE_LIBDL )
>>> -          set(system_libs ${system_libs} ${CMAKE_DL_LIBS})
>>> -        endif()
>>> -        if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
>>> -          set(system_libs ${system_libs} pthread)
>>> -        endif()
>>> -      endif( MINGW )
>>> -    endif( NOT MSVC )
>>> -    set(${return_var} ${system_libs} PARENT_SCOPE)
>>> -  endfunction(get_system_libs)
>>> +  # Load the configuration of the installed llvm.
>>> +  include(${LLVM_INSTALL_ROOT}/share/llvm/cmake/LLVMConfig.cmake)
>>
>>
>> This file is not installed, if LLVM is build with autoconf.
> Sorry, i forgot this, i will fix it and add a comment.
>>
>> What about parsing the output of 'lli -version' to get the information that
>> you need?
>>
>> $lli -version
>> LLVM (http://llvm.org/):
>>   LLVM version 3.1svn
>>   DEBUG build with assertions.
>>   Built Mar 16 2012 (11:26:54).
>>   Default target: x86_64-unknown-linux-gnu
>>   Host CPU: corei7
>>
>> Or even better; Why don't we just execute a trivial LLVM-IR file with an
>> x86_64 triple with lli. If it works, we can use it. Otherwise not.
> like passing an argument like -march=X86_64?

I was thinking of executing one the '.ll' files, which we execute in 
polly-test. You can remove any computations from it and just run it with 
'lli file.ll'.

Tobi



More information about the llvm-commits mailing list