This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Cygwin build harmonization, remove cygwin/Makefile.SHs
[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   # libperl.dll.a fails with -Uusedl. -L../CORE -lperl is better
21   $args{extra_linker_flags} = [
22     '-L'.$self->perl_inc().' -lperl',
23     $self->split_like_shell($args{extra_linker_flags})
24   ];
25
26   return $self->SUPER::link(%args);
27 }
28
29 1;