This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
99ff6d820f876bdb5ce6649e5873695278ac6403
[perl5.git] / lib / ExtUtils / CBuilder / Platform / cygwin.pm
1 package ExtUtils::CBuilder::Platform::cygwin;
2
3 use strict;
4 use File::Spec;
5 use ExtUtils::CBuilder::Platform::Unix;
6
7 use vars qw($VERSION @ISA);
8 $VERSION = '0.23';
9 @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
10
11 sub link_executable {
12   my $self = shift;
13   # $Config{ld} is okay. revert the stupid Unix cc=ld override
14   local $self->{config}{cc} = $self->{config}{ld};
15   return $self->SUPER::link_executable(@_);
16 }
17
18 sub link {
19   my ($self, %args) = @_;
20   $args{extra_linker_flags} = [
21     $self->perl_inc().'/'.($self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a'),
22     $self->split_like_shell($args{extra_linker_flags})
23   ];
24
25   return $self->SUPER::link(%args);
26 }
27
28 1;