summaryrefslogtreecommitdiff
path: root/zephyr/cmake/toolchain/llvm/target.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'zephyr/cmake/toolchain/llvm/target.cmake')
-rw-r--r--zephyr/cmake/toolchain/llvm/target.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/zephyr/cmake/toolchain/llvm/target.cmake b/zephyr/cmake/toolchain/llvm/target.cmake
new file mode 100644
index 0000000000..d79d73d1ae
--- /dev/null
+++ b/zephyr/cmake/toolchain/llvm/target.cmake
@@ -0,0 +1,16 @@
+# Copyright 2020 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+set(COMPILER clang)
+set(LINKER lld)
+set(BINTOOLS llvm)
+
+# Mapping of Zephyr architecture -> toolchain triple
+# Note only "posix" is supported at the moment.
+set(CROSS_COMPILE_TARGET_posix x86_64-pc-linux-gnu)
+
+set(CROSS_COMPILE_TARGET ${CROSS_COMPILE_TARGET_${ARCH}})
+
+set(CC clang)
+set(CROSS_COMPILE "/usr/bin/${CROSS_COMPILE_TARGET}-")