mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00
clang-native: Add class to use clang as native compiler
Some recipes demand full clang/llvm builds e.g. chromium we need to use clang as native toolchain. This class collects all needed bits to enable OE built clang to provide the clang native toolchain Setting TOOLCHAIN_NATIVE = "clang" in recipe will chose clang for native toolchain (From OE-Core rev: 43ba5ed17e069b13cd43c36650524a0113c81955) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
83fb170a09
commit
53d01ed4f4
18
meta/classes/toolchain/clang-native.bbclass
Normal file
18
meta/classes/toolchain/clang-native.bbclass
Normal file
|
@ -0,0 +1,18 @@
|
|||
BUILD_CC = "${CCACHE}${BUILD_PREFIX}clang ${BUILD_CC_ARCH}"
|
||||
BUILD_CXX = "${CCACHE}${BUILD_PREFIX}clang++ ${BUILD_CC_ARCH}"
|
||||
BUILD_FC = "${BUILD_PREFIX}gfortran ${BUILD_CC_ARCH}"
|
||||
BUILD_CPP = "${BUILD_PREFIX}clang ${BUILD_CC_ARCH} -E"
|
||||
BUILD_LD = "${BUILD_PREFIX}ld ${BUILD_LD_ARCH}"
|
||||
BUILD_CCLD = "${BUILD_PREFIX}clang ${BUILD_CC_ARCH}"
|
||||
BUILD_AR = "${BUILD_PREFIX}llvm-ar"
|
||||
BUILD_AS = "${BUILD_PREFIX}as ${BUILD_AS_ARCH}"
|
||||
BUILD_RANLIB = "${BUILD_PREFIX}llvm-ranlib -D"
|
||||
BUILD_STRIP = "${BUILD_PREFIX}llvm-strip"
|
||||
BUILD_OBJCOPY = "${BUILD_PREFIX}llvm-objcopy"
|
||||
BUILD_OBJDUMP = "${BUILD_PREFIX}llvm-objdump"
|
||||
BUILD_NM = "${BUILD_PREFIX}llvm-nm"
|
||||
BUILD_READELF = "${BUILD_PREFIX}llvm-readelf"
|
||||
|
||||
DEPENDS += "clang-native libcxx-native compiler-rt-native"
|
||||
|
||||
LDFLAGS += " --rtlib=libgcc --unwindlib=libgcc"
|
Loading…
Reference in New Issue
Block a user