From 0671c7a953cc168559f14f2104e0f7ceac3dd5ae Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 12 Mar 2015 15:54:28 +0000 Subject: classes: Add a mechanism, to select components to be able to select default compiler We add clang as an alternative compiler, it sitll uses underlying binutils and compiler runtime, it will only do the compilation and defer link, to GNU ld/gold, to compile a component usign clang add TOOLCHAIN_pn- = "clang" DEPENDS_append_pn- = " clang-cross " And OE will start using clang to compile Signed-off-by: Khem Raj --- classes/clang.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 classes/clang.bbclass (limited to 'classes') diff --git a/classes/clang.bbclass b/classes/clang.bbclass new file mode 100644 index 0000000..f6cb648 --- /dev/null +++ b/classes/clang.bbclass @@ -0,0 +1,10 @@ + +# Add the necessary override +TOOLCHAINOVERRIDES = ":toolchain-${TOOLCHAIN}" +TOOLCHAINOVERRIDES[vardepsexclude] = "TOOLCHAIN" + +OVERRIDES .= "${TOOLCHAINOVERRIDES}" +OVERRIDES[vardepsexclude] += "TOOLCHAINOVERRIDES" + +require conf/clang.conf + -- cgit v1.2.3-54-g00ecf