about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-06-12 01:28:37 +0000
committerbors <bors@rust-lang.org>2020-06-12 01:28:37 +0000
commite91bf6c881dc8fa50dc18fc2f518a6c22424ddb5 (patch)
tree54be1329599cb0f0c7d7cae62620894009d1b37d /src/rustllvm/PassWrapper.cpp
parent14027f3e784de815de726a8fb0e74875781c9caf (diff)
parent0340359b2a3e9af1cd94cbf7831f8b77b9bf77a1 (diff)
downloadrust-e91bf6c881dc8fa50dc18fc2f518a6c22424ddb5.tar.gz
rust-e91bf6c881dc8fa50dc18fc2f518a6c22424ddb5.zip
Auto merge of #69478 - avr-rust:avr-support-upstream, r=jonas-schievink
Enable AVR as a Tier 3 target upstream

Tracking issue: #44052.

Things intentionally left out of the initial upstream:

* The `target_cpu` flag

I have made the cleanup suggestions by @jplatte and @jplatte in https://github.com/avr-rust/rust/commit/043550d9db0582add42e5837f636f61acb26b915.

Anybody feel free to give the branch a test and see how it fares, or make suggestions on the code patch itself.
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
-rw-r--r--src/rustllvm/PassWrapper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp
index 02dcfb8e829..3d252fe70af 100644
--- a/src/rustllvm/PassWrapper.cpp
+++ b/src/rustllvm/PassWrapper.cpp
@@ -203,6 +203,12 @@ void LLVMRustAddLastExtensionPasses(
 #define SUBTARGET_AARCH64
 #endif
 
+#ifdef LLVM_COMPONENT_AVR
+#define SUBTARGET_AVR SUBTARGET(AVR)
+#else
+#define SUBTARGET_AVR
+#endif
+
 #ifdef LLVM_COMPONENT_MIPS
 #define SUBTARGET_MIPS SUBTARGET(Mips)
 #else
@@ -249,6 +255,7 @@ void LLVMRustAddLastExtensionPasses(
   SUBTARGET_X86                                                                \
   SUBTARGET_ARM                                                                \
   SUBTARGET_AARCH64                                                            \
+  SUBTARGET_AVR                                                                \
   SUBTARGET_MIPS                                                               \
   SUBTARGET_PPC                                                                \
   SUBTARGET_SYSTEMZ                                                            \