You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I get an error when trying to use this tool to get compile_commands.json on an Android kernel build (Oneplus 12). I am ware that Android provides a way to get compile_commands.json but it is very incomplete when it is something other than the common kernel (so like a real kernel on device) so I am not using that. This is what my WORKSPACE file looks like:
# Copyright (C) 2021 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Hedron's Compile Commands Extractor for Bazel
# https://github.com/hedronvision/bazel-compile-commands-extractor
http_archive(
name = "hedron_compile_commands",
# Replace the commit hash (0e990032f3c5a866e72615cf67e5ce22186dcb97) in both places (below) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main), rather than using the stale one here.
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/4f28899228fb3ad0126897876f147ca15026151e.tar.gz",
strip_prefix = "bazel-compile-commands-extractor-4f28899228fb3ad0126897876f147ca15026151e",
# When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
)
load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
hedron_compile_commands_setup()
load("@hedron_compile_commands//:workspace_setup_transitive.bzl", "hedron_compile_commands_setup_transitive")
hedron_compile_commands_setup_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive()
load("@hedron_compile_commands//:workspace_setup_transitive_transitive_transitive.bzl", "hedron_compile_commands_setup_transitive_transitive_transitive")
hedron_compile_commands_setup_transitive_transitive_transitive()
### build/kernel/kleaf/bazel.WORKSPACE contents ###
load("//build/kernel/kleaf:workspace.bzl", "define_kleaf_workspace")
define_kleaf_workspace()
# Optional epilog for analysis testing.
load("//build/kernel/kleaf:workspace_epilog.bzl", "define_kleaf_workspace_epilog")
define_kleaf_workspace_epilog()
### Qualcomm customizations ###
new_local_repository(
name = "dtc",
path = "external/dtc",
build_file = "msm-kernel/BUILD.dtc",
)
After building the kernel successfully I then try to run tools/bazel run @hedron_compile_commands//:refresh_all and I get:
Android kernel build systems use some prebuilts in order to compile the kernel. It seems like somehow bazel is only copying the bin and lib folders without the include folders in the exec root for some reason for the bazel-compile-commands-extractor.
Is there something I can do to solve this problem ?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi I get an error when trying to use this tool to get compile_commands.json on an Android kernel build (Oneplus 12). I am ware that Android provides a way to get compile_commands.json but it is very incomplete when it is something other than the common kernel (so like a real kernel on device) so I am not using that. This is what my WORKSPACE file looks like:
After building the kernel successfully I then try to run
tools/bazel run @hedron_compile_commands//:refresh_all
and I get:Android kernel build systems use some prebuilts in order to compile the kernel. It seems like somehow bazel is only copying the bin and lib folders without the include folders in the exec root for some reason for the bazel-compile-commands-extractor.
Is there something I can do to solve this problem ?
Thanks.
The text was updated successfully, but these errors were encountered: