From dfc24d03d58e0c4b015898f605228f12c9c4015e Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Mon, 14 Dec 2020 14:35:31 -0700 Subject: toolchain: provide definition for chroot host-based LLVM toolchain This provides a definition for an LLVM toolchain, which acts as a chroot host-based toolchain. This is for compiling unit tests and the posix-ec project, not for real devices. We need this to enable unit tests and posix-ec build in the commit queue, since Zephyr SDK is not available in the chroot. BUG=b:175248887 TEST=zmake configure -b -B $BUILD -t llvm projects/experimental/posix-ec $BUILD/build-singleimage/zephyr/zephyr.elf works Change-Id: Ie71f53cf53503f9279aab654170c7bc2b7a80d20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/zephyr-chrome/+/2590992 Tested-by: Jack Rosenthal Reviewed-by: Simon Glass Commit-Queue: Jack Rosenthal Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2630160 --- zephyr/cmake/bintools/llvm/generic.cmake | 10 ++++++++++ zephyr/cmake/bintools/llvm/target.cmake | 9 +++++++++ 2 files changed, 19 insertions(+) create mode 100644 zephyr/cmake/bintools/llvm/generic.cmake create mode 100644 zephyr/cmake/bintools/llvm/target.cmake (limited to 'zephyr/cmake/bintools') diff --git a/zephyr/cmake/bintools/llvm/generic.cmake b/zephyr/cmake/bintools/llvm/generic.cmake new file mode 100644 index 0000000000..94b35ed51d --- /dev/null +++ b/zephyr/cmake/bintools/llvm/generic.cmake @@ -0,0 +1,10 @@ +# 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(CMAKE_AR "/usr/bin/llvm-ar") +set(CMAKE_NM "/usr/bin/llvm-nm") +set(CMAKE_OBJCOPY "/usr/bin/llvm-objcopy") +set(CMAKE_OBJDUMP "/usr/bin/llvm-objdump") +set(CMAKE_RANLIB "/usr/bin/llvm-ranlib") +set(CMAKE_READELF "/usr/bin/llvm-readelf") diff --git a/zephyr/cmake/bintools/llvm/target.cmake b/zephyr/cmake/bintools/llvm/target.cmake new file mode 100644 index 0000000000..a77d459288 --- /dev/null +++ b/zephyr/cmake/bintools/llvm/target.cmake @@ -0,0 +1,9 @@ +# 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. + +# Use generic bintools. +include("${TOOLCHAIN_ROOT}/cmake/bintools/llvm/generic.cmake") + +# Include the GNU bintools properties as a base. +include("${ZEPHYR_BASE}/cmake/bintools/gnu/target_bintools.cmake") -- cgit v1.2.1