Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion java/private/java_common_internal.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,12 @@ def collect_native_deps_dirs(libraries):
Returns:
([String]) A set of root-relative paths as a list
"""
return get_internal_java_common().collect_native_deps_dirs(libraries)
dirs = {}
for library in libraries.to_list():
dylib = library.dynamic_library
if dylib:
dirs[paths.dirname(dylib.short_path)] = None
return dirs.keys()

def get_runtime_classpath_for_archive(jars, excluded_jars):
"""Filters a classpath to remove certain entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,16 @@ def _test_java_binary_native_library_path_includes_transitive_deps(name):
name = name + "/app",
srcs = ["DoesNotMatter.java"],
deps = [name + "/jni.so"],
# Launchers can contribute extra native deps, affecting test expectations.
use_launcher = False,
)
util.helper_target(
java_binary,
name = name + "/runtime_app",
srcs = ["AlsoDoesNotMatter.java"],
runtime_deps = [name + "/jni.so"],
# Launchers can contribute extra native deps, affecting test expectations.
use_launcher = False,
)
util.helper_target(
cc_binary,
Expand Down Expand Up @@ -286,6 +290,8 @@ def _test_java_binary_native_library_path_separator(name):
name + "/lib1",
name + "/lib2",
],
# Launchers can contribute extra native deps, affecting test expectations.
use_launcher = False,
)

# Define two native libs (in different directories so java.library.path has multiple entries).
Expand Down