Revision: 2622
Author: [email protected]
Date: Wed Aug  5 00:59:46 2009
Log: On Linus don't force-export V8 symbols unless v8 is built as a shared  
library.

This lands: http://codereview.chromium.org/160556.

[email protected]
Review URL: http://codereview.chromium.org/160634
http://code.google.com/p/v8/source/detail?r=2622

Modified:
  /branches/bleeding_edge/SConstruct
  /branches/bleeding_edge/include/v8-debug.h
  /branches/bleeding_edge/include/v8.h

=======================================
--- /branches/bleeding_edge/SConstruct  Fri Jul 31 05:19:20 2009
+++ /branches/bleeding_edge/SConstruct  Wed Aug  5 00:59:46 2009
@@ -126,6 +126,7 @@
      'os:linux': {
        'CCFLAGS':      ['-ansi'] + GCC_EXTRA_CCFLAGS,
        'library:shared': {
+        'CPPDEFINES': ['V8_SHARED'],
          'LIBS': ['pthread']
        }
      },
=======================================
--- /branches/bleeding_edge/include/v8-debug.h  Mon May 18 06:14:37 2009
+++ /branches/bleeding_edge/include/v8-debug.h  Wed Aug  5 00:59:46 2009
@@ -55,7 +55,7 @@

  // Setup for Linux shared library export. See v8.h in this directory for
  // information on how to build/use V8 as shared library.
-#if defined(__GNUC__) && (__GNUC__ >= 4)
+#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
  #define EXPORT __attribute__ ((visibility("default")))
  #else  // defined(__GNUC__) && (__GNUC__ >= 4)
  #define EXPORT
=======================================
--- /branches/bleeding_edge/include/v8.h        Tue Aug  4 07:14:01 2009
+++ /branches/bleeding_edge/include/v8.h        Wed Aug  5 00:59:46 2009
@@ -85,11 +85,10 @@

  #include <stdint.h>

-// Setup for Linux shared library export. There is no need to destinguish
-// neither between building or using the V8 shared library nor between  
using
-// the shared or static V8 library as there is on Windows. Therefore there  
is
-// no checking of BUILDING_V8_SHARED and USING_V8_SHARED.
-#if defined(__GNUC__) && (__GNUC__ >= 4)
+// Setup for Linux shared library export. There is no need to distinguish
+// between building or using the V8 shared library, but we should not
+// export symbols when we are building a static library.
+#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
  #define V8EXPORT __attribute__ ((visibility("default")))
  #define V8EXPORT_INLINE __attribute__ ((visibility("default")))
  #else  // defined(__GNUC__) && (__GNUC__ >= 4)

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to