Skip to content

Instantly share code, notes, and snippets.

@timo
Created July 24, 2019 11:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timo/33435e201cefa791aba115820c30f25c to your computer and use it in GitHub Desktop.
Save timo/33435e201cefa791aba115820c30f25c to your computer and use it in GitHub Desktop.
diff --git a/src/core/CompUnit/PrecompilationRepository.pm6 b/src/core/CompUnit/PrecompilationRepository.pm6
index a439155ed..c1efb84a3 100644
--- a/src/core/CompUnit/PrecompilationRepository.pm6
+++ b/src/core/CompUnit/PrecompilationRepository.pm6
@@ -260,6 +260,11 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
my $out = '';
my $err = '';
my $status;
+ #note "running PrecompRepo.precompile";
+ #note "is stagestats set? { +%*COMPILING<%?OPTIONS><stagestats> } { ~%*COMPILING<%?OPTIONS><stagestats> }";
+ with %*COMPILING<%?OPTIONS><stagestats> {
+ note "precomp $path.relative()";
+ }
react {
my $proc = Proc::Async.new(
$perl6,
@@ -269,6 +274,7 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
"--target=" ~ Rakudo::Internals.PRECOMP-TARGET,
"--output=$bc",
"--source-name=$source-name",
+ |("--stagestats" with %*COMPILING<%?OPTIONS><stagestats>),
$path
);
@@ -280,6 +286,11 @@ class CompUnit::PrecompilationRepository::Default does CompUnit::PrecompilationR
$err ~= $_
}
}
+ with %*COMPILING<%?OPTIONS><stagestats> {
+ whenever $proc.stderr.lines {
+ note(" $_");
+ }
+ }
whenever $proc.start(ENV => %env) {
$status = .exitcode
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment