-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
76 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/starlark/builtins_bzl/common/java/blaze_java_semantics.bzl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# TODO: Remove on import. | ||
|
||
def _get_java_runtime_dependent_runfiles_and_symlinks( | ||
ctx, | ||
*, | ||
executable, | ||
feature_config, | ||
is_absolute_path): | ||
java_runtime_toolchain = semantics.find_java_runtime_toolchain(ctx) | ||
|
||
# Add symlinks to the C++ runtime libraries under a path that can be built | ||
# into the Java binary without having to embed the crosstool, gcc, and grte | ||
# version information contained within the libraries' package paths. | ||
runfiles_symlinks = {} | ||
|
||
if not is_absolute_path(ctx, java_runtime_toolchain.java_home): | ||
runfiles_symlinks = { | ||
("_cpp_runtimes/%s" % lib.basename): lib | ||
for lib in cc_helper.find_cpp_toolchain(ctx).dynamic_runtime_lib( | ||
feature_configuration = feature_config, | ||
).to_list() | ||
} | ||
|
||
return [java_runtime_toolchain.files], runfiles_symlinks | ||
|
||
semantics = struct( | ||
get_java_runtime_dependent_runfiles_and_symlinks = _get_java_runtime_dependent_runfiles_and_symlinks, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters