Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allows the proper use of --no-optimize in --moar-option #750

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Xliff
Copy link
Contributor

@Xliff Xliff commented Nov 30, 2021

Previously, even if --moar-option="--no-optimize" was used, the "--optimize" switch was still added to MoarVM's invocation of ./Configure.pl.

This patch addresses that issue.

Previously, even if --moar-option="--no-optimize" was used, the "--optimize" switch was still added to MoarVM's invocation of ./Configure.pl.

This patch addresses that issue.
@@ -331,7 +331,7 @@ sub gen_moar {
my $force_rebuild = $options->{'force-rebuild'};
my $has_gen_moar = defined $gen_moar;
my @opts = @{ $options->{'moar-option'} || [] };
push @opts, "--optimize";
push @opts, "--optimize" unless grep('--no-optimize', @{ $options->{'moar-option'} });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think, this works as intended. It will still always set --optimize:

> perl -E 'say grep("d", qw(b a c));'
bac
> perl -E 'say grep({$_ eq "d"} qw(b a c));'

> perl -E 'say grep({$_ eq "a"} qw(b a c));'
a

@lizmat lizmat changed the title - Allows the proper use of --no-optimize in --moar-option Allows the proper use of --no-optimize in --moar-option Dec 6, 2021
@coke coke changed the base branch from master to main April 19, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants