Skip to content

Commit

Permalink
More --jvm/-jvm arg stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Feb 1, 2024
1 parent aaba4a2 commit 427f452
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/compiler/args.ml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ let parse_args com =
Common.define com Define.Cppia;
set_platform com Cpp file;
),"<file>","generate Cppia bytecode into target file");
("Target",["--jvm"],[],Arg.String (fun dir ->
("Target",["--jvm"],["-jvm"],Arg.String (fun dir ->
actx.jvm_flag <- true;
set_platform com Jvm dir;
),"<file>","generate JVM bytecode into target file");
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/compiler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,8 @@ module HighLevel = struct
List.iter (fun l -> Hashtbl.add added_libs l ()) libs;
let lines = add_libs libs args server_api.cache has_display in
loop acc (lines @ args)
| ("--jvm" | "--java" | "-java" as arg) :: dir :: args ->
loop_lib arg dir "hxjava" acc args
| ("--jvm") :: dir :: args ->
loop_lib "--jvm" dir "hxjava" acc args
| arg :: l ->
match List.rev (ExtString.String.nsplit arg ".") with
| "hxml" :: _ :: _ when (match acc with "-cmd" :: _ | "--cmd" :: _ -> false | _ -> true) ->
Expand Down

0 comments on commit 427f452

Please sign in to comment.