diff options
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2024-05-20 15:09:29 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2024-05-20 15:09:29 +0000 |
commit | 037a16cdf84a24cf1c313dd7d9f4859ea83096ca (patch) | |
tree | 1257a744a0dbe4a8299d5cf40ecc07f3815d0d52 | |
parent | 3878c3162916f105b37a1046576748aea899e4e5 (diff) | |
parent | 690237727406580977c45d0af7dc6b5d7de10652 (diff) | |
download | u-boot-main.tar.gz |
Merge "ANDROID: Support generating compile_commands.json for u-boot in kleaf" into mainHEADmastermain
-rw-r--r-- | BUILD.bazel | 42 | ||||
-rw-r--r-- | Makefile | 9 |
2 files changed, 50 insertions, 1 deletions
diff --git a/BUILD.bazel b/BUILD.bazel index 1c983a0ce6..ed6c947756 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,7 +1,7 @@ load("@bazel_tools//tools/python:toolchain.bzl", "py_runtime_pair") load("@kernel_toolchain_info//:dict.bzl", "CLANG_VERSION") load("//build/bazel_common_rules/dist:dist.bzl", "copy_to_dist_dir") -load("//build/kernel/kleaf:kernel.bzl", "kernel_build") +load("//build/kernel/kleaf:kernel.bzl", "kernel_build", "kernel_compile_commands") kernel_build( name = "beagle_x15", @@ -35,6 +35,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "crosvm_aarch64_compile_commands", + kernel_build = ":crosvm_aarch64", +) + copy_to_dist_dir( name = "crosvm_aarch64_dist", data = [":crosvm_aarch64"], @@ -56,6 +61,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "kiwi_compile_commands", + kernel_build = ":kiwi", +) + copy_to_dist_dir( name = "kiwi_dist", data = [":kiwi"], @@ -77,6 +87,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "kiwi_p_compile_commands", + kernel_build = ":kiwi_p", +) + copy_to_dist_dir( name = "kiwi_p_dist", data = [":kiwi_p"], @@ -98,6 +113,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "qemu_x86_64_compile_commands", + kernel_build = ":qemu_x86_64", +) + copy_to_dist_dir( name = "qemu_x86_64_dist", data = [":qemu_x86_64"], @@ -119,6 +139,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "crosvm_x86_64_compile_commands", + kernel_build = ":crosvm_x86_64", +) + copy_to_dist_dir( name = "crosvm_x86_64_dist", data = [":crosvm_x86_64"], @@ -139,6 +164,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "gem5_aarch64_compile_commands", + kernel_build = ":gem5_aarch64", +) + copy_to_dist_dir( name = "gem5_aarch64_dist", data = [":gem5_aarch64"], @@ -159,6 +189,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "qemu_aarch64_compile_commands", + kernel_build = ":qemu_aarch64", +) + copy_to_dist_dir( name = "qemu_aarch64_dist", data = [":qemu_aarch64"], @@ -180,6 +215,11 @@ kernel_build( ], ) +kernel_compile_commands( + name = "qemu_arm_compile_commands", + kernel_build = ":qemu_arm", +) + copy_to_dist_dir( name = "qemu_arm_dist", data = [":qemu_arm"], @@ -2109,6 +2109,15 @@ tags ctags: -name '*.[chS]' -print` ln -s ctags tags +ifeq ($(CONFIG_BINMAN),y) +compile_commands.json: System.map u-boot.bin u-boot.dtb u-boot-x86-start16.bin u-boot-x86-reset16.bin + $(call if_changed,binman) + $(srctree)/scripts/gen_compile_commands.py +else +compile_commands.json: System.map u-boot.bin + $(srctree)/scripts/gen_compile_commands.py +endif + etags: etags -a -o etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ -name '*.[chS]' -print` |