2008-10-26 02:47:52 +02:00
|
|
|
# Returns the host triple.
|
|
|
|
# Invokes config.guess
|
|
|
|
|
2012-01-24 19:00:44 +01:00
|
|
|
function( get_host_triple var )
|
2008-10-26 02:47:52 +02:00
|
|
|
if( MSVC )
|
2017-12-13 22:11:14 +01:00
|
|
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
2009-11-08 00:52:27 +01:00
|
|
|
set( value "x86_64-pc-win32" )
|
2009-08-12 02:04:12 +02:00
|
|
|
else()
|
2009-11-08 00:52:27 +01:00
|
|
|
set( value "i686-pc-win32" )
|
2009-08-12 02:04:12 +02:00
|
|
|
endif()
|
2009-08-16 22:50:41 +02:00
|
|
|
elseif( MINGW AND NOT MSYS )
|
2010-10-13 22:15:08 +02:00
|
|
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
|
|
set( value "x86_64-w64-mingw32" )
|
|
|
|
else()
|
|
|
|
set( value "i686-pc-mingw32" )
|
|
|
|
endif()
|
2008-10-26 02:47:52 +02:00
|
|
|
else( MSVC )
|
Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi
Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark
Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D16471
llvm-svn: 258861
2016-01-26 22:29:08 +01:00
|
|
|
set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
|
2008-10-26 02:47:52 +02:00
|
|
|
execute_process(COMMAND sh ${config_guess}
|
|
|
|
RESULT_VARIABLE TT_RV
|
|
|
|
OUTPUT_VARIABLE TT_OUT
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
if( NOT TT_RV EQUAL 0 )
|
|
|
|
message(FATAL_ERROR "Failed to execute ${config_guess}")
|
|
|
|
endif( NOT TT_RV EQUAL 0 )
|
2009-11-08 00:52:27 +01:00
|
|
|
set( value ${TT_OUT} )
|
2008-10-26 02:47:52 +02:00
|
|
|
endif( MSVC )
|
2009-11-08 00:52:27 +01:00
|
|
|
set( ${var} ${value} PARENT_SCOPE )
|
2012-01-24 19:00:44 +01:00
|
|
|
endfunction( get_host_triple var )
|