diff --git a/Configure.pl b/Configure.pl
index 4941a40..b91afa3 100644
a
|
b
|
|
407 | 407 | Use this option if you want imcc's parser and lexer files to be generated. |
408 | 408 | Needs a working parser and lexer. |
409 | 409 | |
| 410 | =item C<--with-llvm> |
| 411 | |
| 412 | Use this option if you have a recent version of LLVM installed and wish Parrot |
| 413 | to link to it. |
| 414 | |
410 | 415 | =back |
411 | 416 | |
412 | 417 | =head1 CONFIGURATION-FILE INTERFACE |
diff --git a/config/auto/llvm.pm b/config/auto/llvm.pm
index f47b972..f2a2bcf 100644
a
|
b
|
|
7 | 7 | =head1 DESCRIPTION |
8 | 8 | |
9 | 9 | Determines whether the Low Level Virtual Machine (LLVM) is installed and |
10 | | functional on the system. It is OK when it doesn't exist. |
| 10 | functional on the system. It is okay when it is not present. When a |
| 11 | sufficiently up-to-date version of LLVM is present, you will need to |
| 12 | specify C<--with-llvm> as an option to C<perl Configure.pl> in order to tell |
| 13 | Parrot to link to LLVM, I<i.e.,> building without LLVM is Parrot's default |
| 14 | setting. |
11 | 15 | |
12 | 16 | =cut |
13 | 17 | |
… |
… |
|
30 | 34 | my ( $self, $conf ) = @_; |
31 | 35 | |
32 | 36 | my $verbose = $conf->options->get( 'verbose' ); |
33 | | my $llvm_config = $conf->options->get( 'llvm-config' ) || 'llvm-config'; |
| 37 | unless ( $conf->options->get( 'with-llvm' ) ) { |
| 38 | $self->_handle_result( $conf, 0 ); |
| 39 | print "LLVM not requested\n" if $verbose; |
| 40 | return 1; |
| 41 | } |
34 | 42 | |
35 | 43 | # We will run various probes for LLVM. If the probes are unsuccessful, we |
36 | 44 | # will set_result to 'no', set 'has_llvm' to '', then return from |
diff --git a/lib/Parrot/Configure/Options/Conf/Shared.pm b/lib/Parrot/Configure/Options/Conf/Shared.pm
index 7874ef4..3744a6d 100644
a
|
b
|
|
71 | 71 | verbose |
72 | 72 | verbose-step |
73 | 73 | version |
| 74 | with-llvm |
74 | 75 | without-crypto |
75 | 76 | without-core-nci-thunks |
76 | 77 | without-extra-nci-thunks |
diff --git a/t/steps/auto/llvm-01.t b/t/steps/auto/llvm-01.t
index f5e028c..f1fb0b6 100644
a
|
b
|
|
5 | 5 | use strict; |
6 | 6 | use warnings; |
7 | 7 | use File::Temp qw( tempdir ); |
8 | | use Test::More tests => 48; |
| 8 | use Test::More tests => 56; |
9 | 9 | use Carp; |
10 | 10 | use lib qw( lib t/configure/testlib ); |
11 | 11 | use_ok('config::auto::llvm'); |
… |
… |
|
36 | 36 | my $step = test_step_constructor_and_description($conf); |
37 | 37 | my $ret = $step->runstep($conf); |
38 | 38 | ok( $ret, "runstep() returned true value" ); |
39 | | like( $step->result(), qr/yes|no/, |
40 | | "Result was either 'yes' or 'no'" ); |
| 39 | like( $step->result(), qr/no/, |
| 40 | "LLVM not requested; hence result is 'no'" ); |
| 41 | ok( ! $conf->data->get( 'has_llvm' ), |
| 42 | "'has_llvm' set to false value, as expected" ); |
41 | 43 | |
42 | 44 | $conf->replenish($serialized); |
43 | 45 | |
44 | | ########## --verbose ########## |
45 | | |
46 | 46 | ($args, $step_list_ref) = process_options( { |
47 | 47 | argv => [ q{--verbose} ], |
48 | 48 | mode => q{configure}, |
… |
… |
|
58 | 58 | \$stdout |
59 | 59 | ); |
60 | 60 | ok( $ret, "runstep() returned true value" ); |
| 61 | like( $step->result(), qr/no/, |
| 62 | "LLVM not requested; hence result is 'no'" ); |
| 63 | ok( ! $conf->data->get( 'has_llvm' ), |
| 64 | "'has_llvm' set to false value, as expected" ); |
| 65 | like( $stdout, qr/LLVM not requested/s, |
| 66 | "LLVM not requested; got expected verbose output" ); |
| 67 | } |
| 68 | |
| 69 | ########### --verbose ########## |
| 70 | |
| 71 | ($args, $step_list_ref) = process_options( { |
| 72 | argv => [ q{--verbose}, q{--with-llvm} ], |
| 73 | mode => q{configure}, |
| 74 | } ); |
| 75 | |
| 76 | $conf->add_steps($pkg); |
| 77 | $conf->options->set( %{$args} ); |
| 78 | $step = test_step_constructor_and_description($conf); |
| 79 | { |
| 80 | my $stdout; |
| 81 | my $ret = capture( |
| 82 | sub { $step->runstep($conf) }, |
| 83 | \$stdout |
| 84 | ); |
| 85 | ok( $ret, "runstep() returned true value" ); |
61 | 86 | like( $step->result(), qr/yes|no/, |
62 | 87 | "Result was either 'yes' or 'no'" ); |
63 | 88 | SKIP: { |