lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [9/14] git commit: refs/heads/master - Use charmonizer's EXTRA_CFLAGS in Perl bindings.
Date Wed, 02 Jan 2013 20:38:07 GMT
Use charmonizer's EXTRA_CFLAGS in Perl bindings.

Start feeding the EXTRA_CFLAGS key generated by charmonizer, and migrate
the tests for LUCY_DEBUG and LUCY_VALGRIND to set extra compiler flags
from the Perl bindings to charmonizer.c.

As of this commit, flags which move to Charmonizer are only used when
compiling .c files from the `clownfish_params => source` dirs, and are
no longer supplied when compiling .xs binding files.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/7aedb754
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/7aedb754
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/7aedb754

Branch: refs/heads/master
Commit: 7aedb75448cc131437113fc3e12f3cf4b2f7b95b
Parents: eb9ecaf
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Wed Dec 12 13:49:25 2012 -0800
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Wed Jan 2 12:10:12 2013 -0800

----------------------------------------------------------------------
 .../compiler/perl/lib/Clownfish/CFC/Perl/Build.pm  |    6 +++---
 clownfish/runtime/perl/buildlib/Clownfish/Build.pm |    8 --------
 perl/buildlib/Lucy/Build.pm                        |    8 --------
 3 files changed, 3 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/7aedb754/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index 4bfb0e1..7f21b39 100644
--- a/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/clownfish/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -391,11 +391,11 @@ sub ACTION_compile_custom_xs {
         push @$c_files, @{ $self->rscan_dir( $source_dir, qr/\.c$/ ) };
     }
     # Compile with -fvisibility=hidden on GCC >= 4.0
-    my $cc_flags = $self->extra_compiler_flags;
+    my $extra_cflags = $self->charmony("EXTRA_CFLAGS");
     if ( $self->config('gccversion') && $Config{dlext} ne 'dll' ) {
         my @version_nums = split( /\./, $self->config('gccversion') );
         if ( $version_nums[0] >= 4 ) {
-            $cc_flags = [ @$cc_flags, '-fvisibility=hidden' ];
+            $extra_cflags .= ' -fvisibility=hidden';
         }
     }
     for my $c_file (@$c_files) {
@@ -409,7 +409,7 @@ sub ACTION_compile_custom_xs {
         $self->add_to_cleanup($ccs_file);
         $cbuilder->compile(
             source               => $c_file,
-            extra_compiler_flags => $cc_flags,
+            extra_compiler_flags => $extra_cflags,
             include_dirs         => $self->include_dirs,
             object_file          => $o_file,
         );

http://git-wip-us.apache.org/repos/asf/lucy/blob/7aedb754/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
----------------------------------------------------------------------
diff --git a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
index 454ac05..c5c58f8 100644
--- a/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
+++ b/clownfish/runtime/perl/buildlib/Clownfish/Build.pm
@@ -63,14 +63,6 @@ sub new {
         if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) {
             push @$extra_ccflags, '-DLUCY_NOTHREADS';
         }
-        if ( defined $ENV{LUCY_VALGRIND} ) {
-            push @$extra_ccflags, qw( -DLUCY_VALGRIND -fno-inline-functions );
-        }
-        elsif ( defined $ENV{LUCY_DEBUG} ) {
-            push @$extra_ccflags, qw(
-                -DLUCY_DEBUG -pedantic -Wall -Wextra -Wno-variadic-macros
-            );
-        }
     }
     $self->extra_compiler_flags(@$extra_ccflags);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/7aedb754/perl/buildlib/Lucy/Build.pm
----------------------------------------------------------------------
diff --git a/perl/buildlib/Lucy/Build.pm b/perl/buildlib/Lucy/Build.pm
index 59dac46..550a27e 100644
--- a/perl/buildlib/Lucy/Build.pm
+++ b/perl/buildlib/Lucy/Build.pm
@@ -68,14 +68,6 @@ sub new {
         if ( $Config{osname} =~ /openbsd/i && !$Config{usethreads} ) {
             push @$extra_ccflags, '-DLUCY_NOTHREADS';
         }
-        if ( defined $ENV{LUCY_VALGRIND} ) {
-            push @$extra_ccflags, qw( -DLUCY_VALGRIND -fno-inline-functions );
-        }
-        elsif ( defined $ENV{LUCY_DEBUG} ) {
-            push @$extra_ccflags, qw(
-                -DLUCY_DEBUG -pedantic -Wall -Wextra -Wno-variadic-macros
-            );
-        }
     }
     $self->extra_compiler_flags(@$extra_ccflags);
 


Mime
View raw message