This reverts commit fc8e5d7c13f62e987b76971116cf290fd01a0c8f.

We need to use the absolute path to the compiler so that the VSCode
configuration generated by devtool ide-sdk could lint meson projects.

A feature was just added to vscode-cpptools to support conveying the
compilerPath in addition to the compile_commands.json. The next
commits adds the necessary configuration. We can revert this one and
keep the meson paths as they were.

Signed-off-by: Enguerrand de Ribaucourt 
<enguerrand.de-ribauco...@savoirfairelinux.com>
---
 meta/classes-recipe/meson-routines.bbclass | 6 ------
 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 9925465ed8f..a944a8fff1c 100644
--- a/meta/classes-recipe/meson-routines.bbclass
+++ b/meta/classes-recipe/meson-routines.bbclass
@@ -10,12 +10,6 @@ def meson_array(var, d):
     items = d.getVar(var).split()
     return repr(items[0] if len(items) == 1 else items)
 
-def meson_array_abspath(var, d):
-    import shutil
-    items = d.getVar(var).split()
-    items[0] = shutil.which(items[0]) or items[0]
-    return repr(items[0] if len(items) == 1 else items)
-
 # Map our ARCH values to what Meson expects:
 # http://mesonbuild.com/Reference-tables.html#cpu-families
 def meson_cpu_family(var, d):
diff --git a/meta/classes-recipe/meson.bbclass 
b/meta/classes-recipe/meson.bbclass
index 31675cf42d1..03fa2c06eb4 100644
--- a/meta/classes-recipe/meson.bbclass
+++ b/meta/classes-recipe/meson.bbclass
@@ -64,13 +64,10 @@ addtask write_config before do_configure
 do_write_config[vardeps] += "CC CXX AR NM STRIP READELF OBJCOPY CFLAGS 
CXXFLAGS LDFLAGS RUSTC RUSTFLAGS EXEWRAPPER_ENABLED"
 do_write_config() {
     # This needs to be Py to split the args into single-element lists
-    # The generated compile_commands.json file can be used by external IDEs
-    # which do not know the $PATH set-up by bitbake. They need the absolute
-    # compiler paths.
     cat >${WORKDIR}/meson.cross <<EOF
 [binaries]
-c = ${@meson_array_abspath('CC', d)}
-cpp = ${@meson_array_abspath('CXX', d)}
+c = ${@meson_array('CC', d)}
+cpp = ${@meson_array('CXX', d)}
 cython = 'cython3'
 ar = ${@meson_array('AR', d)}
 nm = ${@meson_array('NM', d)}
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196010): 
https://lists.openembedded.org/g/openembedded-core/message/196010
Mute This Topic: https://lists.openembedded.org/mt/104505949/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to