summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/meson-routines.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* Revert "meson: use absolute cross-compiler paths"Enguerrand de Ribaucourt2024-02-231-6/+0
| | | | | | | | | | | | | | | | | 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. (From OE-Core rev: 9c2faa835bd7af3e6f6bd7cc08495bd4b3ca9d0b) Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meson: use absolute cross-compiler pathsEnguerrand de Ribaucourt2024-02-201-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among the files generated by meson is compile_commands.json. It is not used by bitbake during the build. However, if the devtool workspace is opened inside an IDE, that IDE can use compile_commands.json to configure linting and code completion. This is notably relied on by the new devtool ide-sdk command. The problem is that the IDE using compile_commands.json does not know the $PATH set-up by bitbake, so it won't find the compiler. This results in linting errors, like missing headers. We can fix this by expliciting the absolute compiler paths in meson.cross. The compile_commands.json specification expressly states: "All paths specified in the command or file fields must be either absolute or relative to this directory." Link: https://clang.llvm.org/docs/JSONCompilationDatabase.html An alternative way to implement this is to directly change CXX inside bitbake.conf to make all recipes use absolute compiler paths.Since this would affect all recipes, so I would like to have the maintainers' opinion on this. It could make sense to use absolute compiler paths for all toolchain binaries, we already do so for the sysroot TOOLCHAIN_OPTIONS. Discussions have been opened with meson/ninja maintainers to implement this at their level: - https://github.com/ninja-build/ninja/issues/2383 - https://github.com/mesonbuild/meson/issues/12834 These tools have even less information on the environment so it makes sense for Yocto to provide the absolute paths. (From OE-Core rev: b4e00248049c2627b05eafa9313a48cf253623fa) Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* class-recipe: add support for loongarch64Jialing Zhang2023-03-231-0/+2
| | | | | | | | | (From OE-Core rev: ec88f703f753efcbad5c077d866a5dc44ad54db0) Signed-off-by: Jialing Zhang <zhangjialing@loongson.cn> Signed-off-by: Qizheng Zhu <zhuqizheng@loongson.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-0/+57
Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>