1 # Returns the host triple.
4 function( get_target_triple var )
7 set( ${var} "x86_64-pc-win32" PARENT_SCOPE )
9 set( ${var} "i686-pc-win32" PARENT_SCOPE )
11 elseif( MINGW AND NOT MSYS )
12 set( ${var} "i686-pc-mingw32" PARENT_SCOPE )
14 set(config_guess ${LLVM_MAIN_SRC_DIR}/autoconf/config.guess)
15 execute_process(COMMAND sh ${config_guess}
17 OUTPUT_VARIABLE TT_OUT
18 OUTPUT_STRIP_TRAILING_WHITESPACE)
19 if( NOT TT_RV EQUAL 0 )
20 message(FATAL_ERROR "Failed to execute ${config_guess}")
21 endif( NOT TT_RV EQUAL 0 )
22 set( ${var} ${TT_OUT} PARENT_SCOPE )
23 message(STATUS "Target triple: ${${var}}")
25 endfunction( get_target_triple var )