Skip to content
Permalink
Browse files

Also support --no-relocatable in perl6-debug.

  • Loading branch information...
patzim committed Feb 13, 2019
1 parent 090f1c9 commit 4a7c487b8ccdcd7d70bf416a5ae1e2b2e9de2974
Showing with 21 additions and 14 deletions.
  1. +21 −14 src/perl6-debug.nqp
@@ -445,6 +445,17 @@ class Perl6::Debugger is Perl6::Compiler {
}

sub MAIN(*@ARGS) {
# XXX Parrot compat hack.
if nqp::islist(@ARGS[0]) {
@ARGS := @ARGS[0];
}

# Initialize dynops.
nqp::p6init();

# Create and configure compiler object.
my $comp := Perl6::Debugger.new();

# Determine Perl6 and NQP dirs.
my $sep := nqp::backendconfig()<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
@@ -454,27 +465,23 @@ sub MAIN(*@ARGS) {
#?if !jvm
my $exec-dir := nqp::substr(nqp::execname(), 0, nqp::rindex(nqp::execname(), $sep));
#?endif
my $perl6-home := nqp::getenvhash()<PERL6_HOME> // $exec-dir ~ '/../share/perl6';
if (nqp::substr($perl6-home, nqp::chars($perl6-home) - 1) eq $sep) {
my $perl6-home := $comp.config<static_perl6_home>
// nqp::getenvhash()<PERL6_HOME>
// $exec-dir ~ '/../share/perl6';
if nqp::substr($perl6-home, nqp::chars($perl6-home) - 1) eq $sep {
$perl6-home := nqp::substr($perl6-home, 0, nqp::chars($perl6-home) - 1);
}
my $nqp-home := nqp::getenvhash()<NQP_HOME> // $exec-dir ~ '/../share/nqp';
if (nqp::substr($nqp-home, nqp::chars($nqp-home) - 1) eq $sep) {

my $nqp-home := $comp.config<static_nqp_home>
// nqp::getenvhash()<NQP_HOME>
// $exec-dir ~ '/../share/nqp';
if nqp::substr($nqp-home, nqp::chars($nqp-home) - 1) eq $sep {
$nqp-home := nqp::substr($nqp-home, 0, nqp::chars($nqp-home) - 1);
}

nqp::bindhllsym('perl6', '$PERL6_HOME', $perl6-home);
nqp::bindhllsym('perl6', '$NQP_HOME', $nqp-home);

# XXX Parrot compat hack.
if nqp::islist(@ARGS[0]) {
@ARGS := @ARGS[0];
}

# Initialize dynops.
nqp::p6init();

# Create and configure compiler object.
my $comp := Perl6::Debugger.new();
$comp.language('perl6');
$comp.parsegrammar(Perl6::HookGrammar);
$comp.parseactions(Perl6::HookActions);

0 comments on commit 4a7c487

Please sign in to comment.
You can’t perform that action at this time.