Skip to content

Commit da9eee2

Browse files
fmeumrules_java Copybara
authored andcommitted
Fix classpath separator when cross-compiling from Windows to Unix (#290)
Closes #290 COPYBARA_INTEGRATE_REVIEW=#290 from fmeum:fix-host-dependence 0805387 PiperOrigin-RevId: 752259438 Change-Id: I5e1134f3ce648cdeb65fa6c739a35debca344f26
1 parent bd9c5f8 commit da9eee2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

java/bazel/rules/bazel_java_binary.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ def _create_stub(ctx, java_attrs, launcher, executable, jvm_flags, main_class, c
236236
"%classpath%",
237237
classpath,
238238
map_each = lambda file: _format_classpath_entry(runfiles_enabled, workspace_prefix, file),
239-
join_with = ctx.configuration.host_path_separator,
239+
# At the moment, this condition is always false since the dedicated
240+
# Windows launcher is used above when targeting Windows.
241+
join_with = ";" if helper.is_target_platform_windows(ctx) else ":",
240242
format_joined = "\"%s\"",
241243
allow_closure = True,
242244
)

0 commit comments

Comments
 (0)