diff options
-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` |