blob: e93e8a489056a214bc9c49db271b53709ce95273 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4DESCRIPTION = "Clang/LLVM based C/C++ compiler (cross-canadian for ${TARGET_ARCH} target)"
5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel"
9
10PN = "clang-cross-canadian-${TRANSLATED_TARGET_ARCH}"
11
12require clang.inc
13require common-source.inc
14inherit cross-canadian
15
16DEPENDS += "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.
19EXTRA_OECONF_PATHS[vardepsexclude] = "TUNE_PKGARCH"
20TARGET_ARCH[vardepsexclude] = "TUNE_ARCH"
21
22do_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}
29SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \
30 *-llvm-ranlib *-llvm-nm *-lld *-ld.lld"
31do_install_append() {
32 cross_canadian_bindirlinks
33}