1 package ExtUtils::CBuilder::Platform::darwin;
5 use ExtUtils::CBuilder::Platform::Unix;
8 our $VERSION = '0.280240'; # VERSION
9 our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
11 my ($osver) = split /\./, $Config{osvers};
12 my $apple_cor = $^X eq "/usr/bin/perl" && $osver >= 18;
16 my $cf = $self->{config};
18 # -flat_namespace isn't a compile flag, it's a linker flag. But
19 # it's mistakenly in Config.pm as both. Make the correction here.
20 local $cf->{ccflags} = $cf->{ccflags};
21 $cf->{ccflags} =~ s/-flat_namespace//;
23 # XCode 12 makes this fatal, breaking tons of XS modules
24 $cf->{ccflags} .= ($cf->{ccflags} ? ' ' : '').'-Wno-error=implicit-function-declaration';
26 $self->SUPER::compile(@_);
29 sub arg_include_dirs {
33 my $perl_inc = $self->perl_inc;
35 $_ eq $perl_inc ? ("-iwithsysroot", $_ ) : "-I$_"
39 return $self->SUPER::arg_include_dirs(@_);