Skip to content

Commit

Permalink
Android needs -lperl
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Jan 15, 2014
1 parent 4011a62 commit db87317
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm
@@ -0,0 +1,27 @@
package ExtUtils::CBuilder::Platform::android;

use strict;
use File::Spec;
use ExtUtils::CBuilder::Platform::Unix;

use vars qw($VERSION @ISA);
$VERSION = '0.280212';
@ISA = qw(ExtUtils::CBuilder::Platform::Unix);

# The Android linker will not recognize symbols from
# libperl unless the module explicitly depends on it.
sub link {
my ($self, %args) = @_;

if ($self->{config}{useshrplib}) {
$args{extra_linker_flags} = [
$self->split_like_shell($args{extra_linker_flags}),
'-L' . $self->perl_inc(),
'-lperl',
];
}

return $self->SUPER::link(%args);
}

1;

0 comments on commit db87317

Please sign in to comment.