lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [5/6] git commit: Set -fvisibility flag via charmonizer
Date Sun, 16 Feb 2014 23:20:06 GMT
Set -fvisibility flag via charmonizer


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

Branch: refs/heads/cflags
Commit: cc26fa0ae00bc0e8e1b1785a7ed1e296ee970cf0
Parents: b989a80
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Feb 16 22:14:37 2014 +0100
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Mon Feb 17 00:18:42 2014 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC/Perl/Build.pm | 11 ++---------
 runtime/common/charmonizer.c                  |  3 ++-
 runtime/common/charmonizer.main               |  3 ++-
 3 files changed, 6 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cc26fa0a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
index 8191cee..c798ece 100644
--- a/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
+++ b/compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
@@ -370,14 +370,7 @@ sub ACTION_compile_custom_xs {
     for my $source_dir (@$source_dirs) {
         push @$c_files, @{ $self->rscan_dir( $source_dir, qr/\.c$/ ) };
     }
-    # Compile with -fvisibility=hidden on GCC >= 4.0
-    my $extra_cflags = $self->clownfish_params('cflags') || '';
-    if ( $self->config('gccversion') && $Config{dlext} ne 'dll' ) {
-        my @version_nums = split( /\./, $self->config('gccversion') );
-        if ( $version_nums[0] >= 4 ) {
-            $extra_cflags .= ' -fvisibility=hidden';
-        }
-    }
+    my $extra_cflags = $self->clownfish_params('cflags');
     for my $c_file (@$c_files) {
         my $o_file   = $c_file;
         my $ccs_file = $c_file;
@@ -413,7 +406,7 @@ sub ACTION_compile_custom_xs {
     unshift @objects, $perl_binding_o_file;
     $self->add_to_cleanup($perl_binding_o_file);
     if ( !$self->up_to_date( $perl_binding_c_file, $perl_binding_o_file ) ) {
-        # Don't use -fvisibility=hidden for XS
+        # Don't use Clownfish compiler flags for XS
         $cbuilder->compile(
             source               => $perl_binding_c_file,
             extra_compiler_flags => $self->extra_compiler_flags,

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cc26fa0a/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c
index 382cbe2..8bee506 100644
--- a/runtime/common/charmonizer.c
+++ b/runtime/common/charmonizer.c
@@ -7077,6 +7077,8 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) {
 
     chaz_CFlags_add_define(extra_cflags, "CFP_CFISH", NULL);
     chaz_CFlags_add_define(extra_cflags, "CFP_TESTCFISH", NULL);
+
+    chaz_CFlags_hide_symbols(extra_cflags);
 }
 
 static int
@@ -7177,7 +7179,6 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_CFlags_enable_debugging(makefile_cflags);
     chaz_CFlags_disable_strict_aliasing(makefile_cflags);
     chaz_CFlags_compile_shared_library(makefile_cflags);
-    chaz_CFlags_hide_symbols(makefile_cflags);
     if (args->code_coverage) {
         chaz_CFlags_enable_code_coverage(makefile_cflags);
     }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cc26fa0a/runtime/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.main b/runtime/common/charmonizer.main
index 1cba2c5..bc31c9c 100644
--- a/runtime/common/charmonizer.main
+++ b/runtime/common/charmonizer.main
@@ -83,6 +83,8 @@ S_add_compiler_flags(struct chaz_CLIArgs *args) {
 
     chaz_CFlags_add_define(extra_cflags, "CFP_CFISH", NULL);
     chaz_CFlags_add_define(extra_cflags, "CFP_TESTCFISH", NULL);
+
+    chaz_CFlags_hide_symbols(extra_cflags);
 }
 
 static int
@@ -183,7 +185,6 @@ S_write_makefile(struct chaz_CLIArgs *args) {
     chaz_CFlags_enable_debugging(makefile_cflags);
     chaz_CFlags_disable_strict_aliasing(makefile_cflags);
     chaz_CFlags_compile_shared_library(makefile_cflags);
-    chaz_CFlags_hide_symbols(makefile_cflags);
     if (args->code_coverage) {
         chaz_CFlags_enable_code_coverage(makefile_cflags);
     }


Mime
View raw message