2008-10-26 08:47:52 +08:00
|
|
|
# Returns the host triple.
|
|
|
|
# Invokes config.guess
|
|
|
|
|
2012-01-25 02:00:44 +08:00
|
|
|
function( get_host_triple var )
|
2008-10-26 08:47:52 +08:00
|
|
|
if( MSVC )
|
2009-08-12 08:04:12 +08:00
|
|
|
if( CMAKE_CL_64 )
|
2009-11-08 07:52:27 +08:00
|
|
|
set( value "x86_64-pc-win32" )
|
2009-08-12 08:04:12 +08:00
|
|
|
else()
|
2009-11-08 07:52:27 +08:00
|
|
|
set( value "i686-pc-win32" )
|
2009-08-12 08:04:12 +08:00
|
|
|
endif()
|
2009-08-17 04:50:41 +08:00
|
|
|
elseif( MINGW AND NOT MSYS )
|
2010-10-14 04:15:08 +08:00
|
|
|
if( CMAKE_SIZEOF_VOID_P EQUAL 8 )
|
|
|
|
set( value "x86_64-w64-mingw32" )
|
|
|
|
else()
|
|
|
|
set( value "i686-pc-mingw32" )
|
|
|
|
endif()
|
2008-10-26 08:47:52 +08: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-27 05:29:08 +08:00
|
|
|
set(config_guess ${LLVM_MAIN_SRC_DIR}/cmake/config.guess)
|
2008-10-26 08:47:52 +08: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 07:52:27 +08:00
|
|
|
set( value ${TT_OUT} )
|
2008-10-26 08:47:52 +08:00
|
|
|
endif( MSVC )
|
2009-11-08 07:52:27 +08:00
|
|
|
set( ${var} ${value} PARENT_SCOPE )
|
2012-01-25 02:00:44 +08:00
|
|
|
endfunction( get_host_triple var )
|