[llvm] r351678 - [AVR] Allow AVR to be explicitly set as the default target triple

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 20 03:12:39 PST 2019


Author: dylanmckay
Date: Sun Jan 20 03:12:39 2019
New Revision: 351678

URL: http://llvm.org/viewvc/llvm-project?rev=351678&view=rev
Log:
[AVR] Allow AVR to be explicitly set as the default target triple

This extends the CMake cross compilation logic so that AVR can be set as
the default target triple, and thus the generic codegen tests can be
run.

This used to be possible on AVR; the CMake configuration files have
since been changed.

With this patch, 'cmake -DLLVM_DEFAULT_TARGET_TRIPLE=avr-unknown-unknown' can
be passed on the command line, making the `-mcpu` argument redundant to
'llc' and friends.

Modified:
    llvm/trunk/cmake/config-ix.cmake

Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=351678&r1=351677&r2=351678&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Sun Jan 20 03:12:39 2019
@@ -392,6 +392,8 @@ elseif (LLVM_NATIVE_ARCH MATCHES "arm64"
   set(LLVM_NATIVE_ARCH AArch64)
 elseif (LLVM_NATIVE_ARCH MATCHES "arm")
   set(LLVM_NATIVE_ARCH ARM)
+elseif (LLVM_NATIVE_ARCH MATCHES "avr")
+  set(LLVM_NATIVE_ARCH AVR)
 elseif (LLVM_NATIVE_ARCH MATCHES "mips")
   set(LLVM_NATIVE_ARCH Mips)
 elseif (LLVM_NATIVE_ARCH MATCHES "xcore")




More information about the llvm-commits mailing list