[PATCH] D22370: Respect LLVM_HOST_TRIPLE when manually specified

Luke Drummond via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 10:49:09 PDT 2016


ldrumm created this revision.
ldrumm added reviewers: chandlerc, zturner.
ldrumm added a subscriber: llvm-commits.
ldrumm set the repository for this revision to rL LLVM.
Herald added subscribers: danalbert, tberghammer.

If the user specifies `-DLLVM_HOST_TRIPLE=...` this should override the guess made by CMake

This appears necessary when cross-compiling Android `lldb-server` on win32 where the host triple guessed by cmake interferes with the target triple

Repository:
  rL LLVM

https://reviews.llvm.org/D22370

Files:
  cmake/modules/GetHostTriple.cmake

Index: cmake/modules/GetHostTriple.cmake
===================================================================
--- cmake/modules/GetHostTriple.cmake
+++ cmake/modules/GetHostTriple.cmake
@@ -2,6 +2,10 @@
 # Invokes config.guess
 
 function( get_host_triple var )
+  if( LLVM_HOST_TRIPLE )
+	set( value ${LLVM_HOST_TRIPLE} )
+	return()
+  endif()
   if( MSVC )
     if( CMAKE_CL_64 )
       set( value "x86_64-pc-win32" )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22370.64006.patch
Type: text/x-patch
Size: 419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160714/8c12c09e/attachment.bin>


More information about the llvm-commits mailing list