rjw | 1f88458 | 2022-01-06 17:20:42 +0800 | [diff] [blame^] | 1 | # Copyright (C) 2014 Khem Raj <raj.khem@gmail.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | DESCRIPTION = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)" |
| 5 | HOMEPAGE = "http://clang.llvm.org/" |
| 6 | LICENSE = "NCSA" |
| 7 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7" |
| 8 | SECTION = "devel" |
| 9 | |
| 10 | PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}" |
| 11 | |
| 12 | require clang.inc |
| 13 | require common-source.inc |
| 14 | inherit cross-canadian |
| 15 | |
| 16 | DEPENDS += "nativesdk-clang binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-libc" |
| 17 | # We have to point gcc at a sysroot but we don't need to rebuild if this changes |
| 18 | # e.g. we switch between different machines with different tunes. |
| 19 | EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH" |
| 20 | TARGET_ARCH[vardepsexclude] = "TUNE_ARCH" |
| 21 | |
| 22 | do_install() { |
| 23 | install -d ${D}${bindir} |
| 24 | for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata llvm-ar llvm-ranlib llvm-nm |
| 25 | do |
| 26 | ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool |
| 27 | done |
| 28 | } |
| 29 | SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ |
| 30 | *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" |
| 31 | do_install_append() { |
| 32 | cross_canadian_bindirlinks |
| 33 | } |