blob: ffe144a3f5f1bba44dd8994426aec106de68c38c [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 = "Cross compiler wrappers for LLVM based C/C++ compiler"
5HOMEPAGE = "http://clang.llvm.org/"
6LICENSE = "NCSA"
7LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/NCSA;md5=1b5fdec70ee13ad8a91667f16c1959d7"
8SECTION = "devel"
9
10PN = "clang-cross-${TARGET_ARCH}"
11
12require clang.inc
13require common-source.inc
14inherit cross
15DEPENDS += "clang-native binutils-cross-${TARGET_ARCH}"
16
17do_install() {
18 install -d ${D}${bindir}
19 for tool in clang clang++ clang-tidy lld ld.lld llvm-profdata llvm-ar llvm-ranlib llvm-nm
20 do
21 ln -sf ../$tool ${D}${bindir}/${TARGET_PREFIX}$tool
22 done
23}
24SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \
25 *-llvm-ranlib *-llvm-nm *-lld *-ld.lld"
26
27SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess"
28
29clangcross_sysroot_preprocess () {
30 sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
31}
32PACKAGES = ""