Skip to content

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.
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.

3 participants