Created
April 17, 2023 13:56
-
-
Save antznin/b1fabb94201cb8ba8b56e9d5bd850a89 to your computer and use it in GitHub Desktop.
Generate compile_commands.json file with a Linux bbappend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do_gen_compile_commands () { | |
python3 ${S}/scripts/clang-tools/gen_compile_commands.py \ | |
--directory "${B}" \ | |
--ar "${AR}" \ | |
--log_level DEBUG \ | |
--output "${B}/compile_commands.json" | |
bbnote "Generated ${B}/compile_commands.json" | |
} | |
do_gen_compile_commands[doc] = "Generate compile_commands.json file for use with clangd" | |
do_gen_compile_commands[depends] += "python3-native:do_populate_sysroot" | |
addtask do_gen_compile_commands after do_compile_kernelmodules |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested with linux-ti-staging version 5.10 in a Yocto Kirkstone environment.