[OE-core] [PATCH] meson: Adjust for clang compiler

Khem Raj raj.khem at gmail.com
Mon Jan 29 17:44:22 UTC 2018


On Mon, Jan 29, 2018 at 9:21 AM, Burton, Ross <ross.burton at intel.com> wrote:
> On 27 January 2018 at 07:06, Khem Raj <raj.khem at gmail.com> wrote:
>>
>> 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>
>> ---
>>  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 91ac652651..cd3497a802 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++"
>> +
>
>
> Can we do this in bitbake.conf instead of repeating ourselves?

having it in meson bbclass keeps it to meson based recipes,
bitbake.conf is a bit too generic.

>
> Ross



More information about the Openembedded-core mailing list