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 = "Cross compiler wrappers for LLVM based C/C++ compiler" |
| 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-${TARGET_ARCH}" |
| 11 | |
| 12 | require clang.inc |
| 13 | require common-source.inc |
| 14 | inherit cross |
| 15 | DEPENDS += "clang-native binutils-cross-${TARGET_ARCH}" |
| 16 | |
| 17 | do_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 | } |
| 24 | SSTATE_SCAN_FILES += "*-clang *-clang++ *-llvm-profdata *-llvm-ar \ |
| 25 | *-llvm-ranlib *-llvm-nm *-lld *-ld.lld" |
| 26 | |
| 27 | SYSROOT_PREPROCESS_FUNCS += "clangcross_sysroot_preprocess" |
| 28 | |
| 29 | clangcross_sysroot_preprocess () { |
| 30 | sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir} |
| 31 | } |
| 32 | PACKAGES = "" |