diff options
-rw-r--r-- | meta/classes-recipe/meson-routines.bbclass | 6 | ||||
-rw-r--r-- | meta/classes-recipe/meson.bbclass | 7 |
2 files changed, 2 insertions, 11 deletions
diff --git a/meta/classes-recipe/meson-routines.bbclass b/meta/classes-recipe/meson-routines.bbclass index 9925465ed8..a944a8fff1 100644 --- a/meta/classes-recipe/meson-routines.bbclass +++ b/meta/classes-recipe/meson-routines.bbclass | |||
@@ -10,12 +10,6 @@ def meson_array(var, d): | |||
10 | items = d.getVar(var).split() | 10 | items = d.getVar(var).split() |
11 | return repr(items[0] if len(items) == 1 else items) | 11 | return repr(items[0] if len(items) == 1 else items) |
12 | 12 | ||
13 | def meson_array_abspath(var, d): | ||
14 | import shutil | ||
15 | items = d.getVar(var).split() | ||
16 | items[0] = shutil.which(items[0]) or items[0] | ||
17 | return repr(items[0] if len(items) == 1 else items) | ||
18 | |||
19 | # Map our ARCH values to what Meson expects: | 13 | # Map our ARCH values to what Meson expects: |
20 | # http://mesonbuild.com/Reference-tables.html#cpu-families | 14 | # http://mesonbuild.com/Reference-tables.html#cpu-families |
21 | def meson_cpu_family(var, d): | 15 | def meson_cpu_family(var, d): |
diff --git a/meta/classes-recipe/meson.bbclass b/meta/classes-recipe/meson.bbclass index 31675cf42d..03fa2c06eb 100644 --- a/meta/classes-recipe/meson.bbclass +++ b/meta/classes-recipe/meson.bbclass | |||
@@ -64,13 +64,10 @@ addtask write_config before do_configure | |||
64 | do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED" | 64 | do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED" |
65 | do_write_config() { | 65 | do_write_config() { |
66 | # This needs to be Py to split the args into single-element lists | 66 | # This needs to be Py to split the args into single-element lists |
67 | # The generated compile_commands.json file can be used by external IDEs | ||
68 | # which do not know the $PATH set-up by bitbake. They need the absolute | ||
69 | # compiler paths. | ||
70 | cat >${WORKDIR}/meson.cross <<EOF | 67 | cat >${WORKDIR}/meson.cross <<EOF |
71 | [binaries] | 68 | [binaries] |
72 | c = ${@meson_array_abspath('CC', d)} | 69 | c = ${@meson_array('CC', d)} |
73 | cpp = ${@meson_array_abspath('CXX', d)} | 70 | cpp = ${@meson_array('CXX', d)} |
74 | cython = 'cython3' | 71 | cython = 'cython3' |
75 | ar = ${@meson_array('AR', d)} | 72 | ar = ${@meson_array('AR', d)} |
76 | nm = ${@meson_array('NM', d)} | 73 | nm = ${@meson_array('NM', d)} |