Reviewers: piman, Description: 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] Please review this at http://codereview.chromium.org/160634 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M SConstruct M include/v8-debug.h M include/v8.h Index: include/v8.h =================================================================== --- include/v8.h (revision 2621) +++ include/v8.h (working copy) @@ -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) Index: include/v8-debug.h =================================================================== --- include/v8-debug.h (revision 2621) +++ include/v8-debug.h (working copy) @@ -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 Index: SConstruct =================================================================== --- SConstruct (revision 2621) +++ SConstruct (working copy) @@ -126,6 +126,7 @@ 'os:linux': { 'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS, 'library:shared': { + 'CPPDEFINES': ['V8_SHARED'], 'LIBS': ['pthread'] } }, --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
