This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Propagate LDLIBPTH into run_tests - Fixes 5.12 blocker [perl #70057]
[perl5.git] / cpan / ExtUtils-CBuilder / lib / ExtUtils / CBuilder / Platform / cygwin.pm
CommitLineData
6b09c160
YST
1package ExtUtils::CBuilder::Platform::cygwin;
2
3use strict;
4use File::Spec;
5use ExtUtils::CBuilder::Platform::Unix;
6
7use vars qw($VERSION @ISA);
3698b7be 8$VERSION = '0.260301';
6b09c160
YST
9@ISA = qw(ExtUtils::CBuilder::Platform::Unix);
10
11sub link_executable {
12 my $self = shift;
673223b5 13 # $Config{ld} is okay. Circumvent the Unix ld=cc override in the superclass.
5f9145a3 14 local $self->{config}{cc} = $self->{config}{ld};
6b09c160
YST
15 return $self->SUPER::link_executable(@_);
16}
17
18sub link {
19 my ($self, %args) = @_;
673223b5
DM
20
21 my $lib = $self->{config}{useshrplib} ? 'libperl.dll.a' : 'libperl.a';
6b09c160 22 $args{extra_linker_flags} = [
673223b5 23 File::Spec->catfile($self->perl_inc(), $lib),
6b09c160
YST
24 $self->split_like_shell($args{extra_linker_flags})
25 ];
26
27 return $self->SUPER::link(%args);
28}
29
301;