]> granicus.if.org Git - llvm/commitdiff
[AVR] Allow AVR to be explicitly set as the default target triple
authorDylan McKay <me@dylanmckay.io>
Sun, 20 Jan 2019 11:12:39 +0000 (11:12 +0000)
committerDylan McKay <me@dylanmckay.io>
Sun, 20 Jan 2019 11:12:39 +0000 (11:12 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351678 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/config-ix.cmake

index 900c35ee4f0c9bb01c39097e8ba4b013b0c73505..30ee2b9cbb68dfb5ce8b6e8520cd97d8db046a2a 100644 (file)
@@ -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")