[llvm] [MLGO] Add ability to extract IR from bazel using aquery (PR #96964)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 27 14:21:36 PDT 2024


================
@@ -316,6 +316,27 @@ def make_spec(obj_file: str):
     return [make_spec(path) for path in paths]
 
 
+def load_bazel_aquery(aquery_json, obj_base_dir: str, output_dir: str):
+    """Creates an object file array by looking at the JSON output of bazel aquery.
+
+    Args:
+      aquery_json: The JSON-formatted output of the bazel aquery command for
----------------
boomanaiden154 wrote:

It's a JSON version of [this proto](https://github.com/bazelbuild/bazel/blob/3f93d377d036d773fd505a18e084425a00fb94ea/src/main/protobuf/analysis_v2.proto#L25). I've added a comment.

https://github.com/llvm/llvm-project/pull/96964


More information about the llvm-commits mailing list