[oe-commits] [openembedded-core] 28/31: meson: Adjust for clang compiler
git at git.openembedded.org
git at git.openembedded.org
Sun Jan 28 10:27:24 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 6abfcc61fb136c34ea3271697ba8f0ce29f0d382
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Fri Jan 26 23:06:26 2018 -0800
meson: Adjust for clang compiler
Remove hardcoding c/c++ compiler to be gcc alone, its
possible to use clang as replacement for cross compilers
from meta-clang, therefore set clang/clang++ if
TOOLCHAIN = "clang"
Signed-off-by: Khem Raj <raj.khem at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/meson.bbclass | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/meta/classes/meson.bbclass b/meta/classes/meson.bbclass
index 91ac652..cd3497a 100644
--- a/meta/classes/meson.bbclass
+++ b/meta/classes/meson.bbclass
@@ -40,6 +40,11 @@ EXTRA_OEMESON += "${PACKAGECONFIG_CONFARGS}"
MESON_CROSS_FILE = ""
MESON_CROSS_FILE_class-target = "--cross-file ${WORKDIR}/meson.cross"
+CCOMPILER ?= "gcc"
+CXXCOMPILER ?= "g++"
+CCOMPILER_toolchain-clang = "clang"
+CXXCOMPILER_toolchain-clang = "clang++"
+
def meson_array(var, d):
return "', '".join(d.getVar(var).split()).join(("'", "'"))
@@ -49,8 +54,8 @@ do_write_config() {
# This needs to be Py to split the args into single-element lists
cat >${WORKDIR}/meson.cross <<EOF
[binaries]
-c = '${HOST_PREFIX}gcc'
-cpp = '${HOST_PREFIX}g++'
+c = '${HOST_PREFIX}${CCOMPILER}'
+cpp = '${HOST_PREFIX}${CXXCOMPILER}'
ar = '${HOST_PREFIX}ar'
ld = '${HOST_PREFIX}ld'
strip = '${HOST_PREFIX}strip'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list