File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
substratevm/mx.substratevm Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2023,20 +2023,24 @@ def native_image_on_jvm(args, **kwargs):
20232023 for key , value in javaProperties .items ():
20242024 args .append ("-D" + key + "=" + value )
20252025
2026- arg = [executable ]
20272026 jacoco_args = mx_gate .get_jacoco_agent_args (agent_option_prefix = '-J' )
20282027 if jacoco_args is not None :
20292028 arg += jacoco_args
2030- arg += args
2031- mx .run (arg , ** kwargs )
2029+ mx .run ([executable ] + _debug_args () + args , ** kwargs )
20322030
20332031@mx .command (suite .name , 'native-image-configure' )
20342032def native_image_configure_on_jvm (args , ** kwargs ):
20352033 executable = vm_executable_path ('native-image-configure' )
20362034 if not exists (executable ):
20372035 mx .abort ("Can not find " + executable + "\n Did you forget to build? Try `mx build`" )
2038- mx .run ([executable ] + args , ** kwargs )
2036+ mx .run ([executable ] + _debug_args () + args , ** kwargs )
20392037
2038+ def _debug_args ():
2039+ debug_args = get_jdk ().debug_args
2040+ if debug_args and not mx .is_debug_disabled ():
2041+ # prefix debug args with `--vm.` for bash launchers
2042+ return [f'--vm.{ arg [1 :]} ' for arg in debug_args ]
2043+ return []
20402044
20412045@mx .command (suite .name , 'native-unittest' )
20422046def native_unittest (args ):
You can’t perform that action at this time.
0 commit comments