Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 798e8876 authored by Christopher Parsons's avatar Christopher Parsons Committed by Gerrit Code Review
Browse files

Merge "cquery: obtain objects from custom provider"

parents 1c0557ea 9eae3cb8
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
@@ -111,6 +111,12 @@ staticLibraries = []
rootStaticArchives = []
linker_inputs = cc_info.linking_context.linker_inputs.to_list()

static_info_tag = "//build/bazel/rules:cc_library_static.bzl%CcStaticLibraryInfo"
if static_info_tag in providers(target):
  static_info = providers(target)[static_info_tag]
  ccObjectFiles = [f.path for f in static_info.objects]
  rootStaticArchives = [static_info.root_static_archive.path]
else:
  for linker_input in linker_inputs:
    for library in linker_input.libraries:
      for object in library.objects:
@@ -141,9 +147,10 @@ returns = [
  system_includes,
  rootStaticArchives,
  rootDynamicLibraries,
  [toc_file]
]

return "|".join([", ".join(r) for r in returns] + [toc_file])`
return "|".join([", ".join(r) for r in returns])`
}

// ParseResult returns a value obtained by parsing the result of the request's Starlark function.