Skip to content

Commit

Permalink
Merge pull request #3904 from usev6/jvm_nqp_execname
Browse files Browse the repository at this point in the history
Start to use nqp::execname on the JVM backend
  • Loading branch information
lizmat committed Sep 4, 2020
2 parents 0e7ec13 + 3ba803d commit 49f3d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 0 additions & 6 deletions src/Perl6/SysConfig.nqp
Expand Up @@ -6,13 +6,7 @@ class Perl6::SysConfig is HLL::SysConfig {
%!rakudo-build-config := nqp::hash();

# Determine Rakudo home.
#?if jvm
# TODO could be replaced by nqp::execname() after the next bootstrap for JVM
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname') // '';
#?endif
#?if !jvm
my $execname := nqp::execname();
#?endif
my $install-dir := $execname eq ''
?? %!rakudo-build-config<prefix>
!! nqp::substr($execname, 0, nqp::rindex($execname, self.path-sep, nqp::rindex($execname, self.path-sep) - 1));
Expand Down
6 changes: 2 additions & 4 deletions src/core.c/Process.pm6
Expand Up @@ -11,17 +11,15 @@ Rakudo::Internals.REGISTER-DYNAMIC: '$*RAKUDO_MODULE_DEBUG', {

Rakudo::Internals.REGISTER-DYNAMIC: '$*EXECUTABLE', {
PROCESS::<$EXECUTABLE> := IO::Path.new(:CWD(INIT nqp::cwd()),
nqp::execname()
#?if jvm
$*VM.properties<perl6.execname>
// $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
|| $*VM.properties<perl6.prefix> ~ '/bin/perl6-j'
#?endif
#?if moar
nqp::execname()
|| ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-m.exe' !! 'perl6-m'))
#?endif
#?if js
nqp::execname()
// ($*VM.config<prefix> ~ '/bin/'
~ ($*VM.config<osname> eq 'MSWin32' ?? 'perl6-js.bat' !! 'perl6-js'))
#?endif
Expand Down

0 comments on commit 49f3d43

Please sign in to comment.