Support arguments in $Config{cc}
Some Perl setups have a command with additional arguments in $Config{cc}
like 'ccache cc'.
Fixes CLOWNFISH-16.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/95e5c3ad
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/95e5c3ad
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/95e5c3ad
Branch: refs/heads/master
Commit: 95e5c3ad237ae97c19e1d43abe5f1b2dec21536d
Parents: b5d43c4
Author: Nick Wellnhofer <[email protected]>
Authored: Wed Sep 17 10:46:42 2014 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Wed Sep 17 10:49:01 2014 +0200
----------------------------------------------------------------------
compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/95e5c3ad/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
b/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
index 2e49e73..a37b6b4 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build/Charmonic.pm
@@ -74,16 +74,18 @@ sub ACTION_charmony {
}
# Prepare arguments to charmonizer.
+ my @cc_args = $self->split_like_shell($self->config('cc'));
+ my $cc = shift(@cc_args);
my @command = (
$CHARMONIZER_EXE_PATH,
- '--cc=' . $self->config('cc'),
+ "--cc=$cc",
'--enable-c',
'--enable-perl',
);
if ( !$self->config('usethreads') ) {
push @command, '--disable-threads';
}
- push @command, ( '--', $self->config('ccflags') );
+ push @command, ( '--', @cc_args, $self->config('ccflags') );
if ( $ENV{CHARM_VALGRIND} ) {
unshift @command, "valgrind", "--leak-check=yes";
}