in reply to Re: ExtUtils::CBuilder->compile() ignores flags
in thread ExtUtils::CBuilder->compile() ignores flags

I have emptied CFLAGS (edit:and CCFLAGS, and from the prompt): $ENV{CFLAGS}=''; but no change...

So, I did this:

# before compile() is called (and after new()) $cbuilder->{config}->{ccflags} =~ s/(?<=\s)\-O[0-9]{0,2}(?=\s|$)//g; # + remove -OXX $cbuilder->{config}->{ccflags} =~ s/(?<=\s)\-g(?=\s|$)//g # remove -g

Thanks