Retrieve shared lib output from custom provider
Use of the native CcSharedLibraryInfo results in using a superfluous
symlink for shared libraries in mixed builds. The new provider
propagates an unwrapped output file (real file, not a symlink).
Test: With related rules changes, manually verified that installed
mixed-build libc was not a symlink. (cf_x86_64, inspected system.img
with `m droid`)
Change-Id: I2a59b348fbfc2a381c229d66c0098e87674a9ddc
diff --git a/bazel/cquery/request_type.go b/bazel/cquery/request_type.go
index d32e619..5cee6ac 100644
--- a/bazel/cquery/request_type.go
+++ b/bazel/cquery/request_type.go
@@ -134,13 +134,13 @@
sharedLibraries = []
rootSharedLibraries = []
-shared_info_tag = "@_builtins//:common/cc/experimental_cc_shared_library.bzl%CcSharedLibraryInfo"
+shared_info_tag = "//build/bazel/rules/cc:cc_library_shared.bzl%CcSharedLibraryOutputInfo"
+
if shared_info_tag in providers(target):
shared_info = providers(target)[shared_info_tag]
- for lib in shared_info.linker_input.libraries:
- path = lib.dynamic_library.path
- rootSharedLibraries += [path]
- sharedLibraries.append(path)
+ path = shared_info.output_file.path
+ sharedLibraries.append(path)
+ rootSharedLibraries += [path]
else:
for linker_input in linker_inputs:
for library in linker_input.libraries: