Apply the flags to the SCons environment used to link the library to have the
authorsgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 11 Sep 2008 14:39:11 +0000 (14:39 +0000)
committersgjesse@chromium.org <sgjesse@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 11 Sep 2008 14:39:11 +0000 (14:39 +0000)
LINKFLAGS take effect. This fixes building shared libraries on 64-bit Linux.

Removed the CCFLAGS from the CXXFLAGS for Linux as SCons combines these
automatically on Linux. This removed the duplication of flags when compiling on
Linux.

On Linux SCons defines CXXCOM as follows

  'CXXCOM': '$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES'

whereas on Windows it is

  'CXXCOM': '$CXX $CXXFLAGS $CCCOMFLAGS'

Review URL: http://codereview.chromium.org/2422

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@284 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

SConstruct

index 84f6b091e24ec59e95d0ad9c943360e107a4b124..82be921634b57aa67bfba4a345636617afaa9233 100644 (file)
@@ -45,7 +45,7 @@ LIBRARY_FLAGS = {
       'DIALECTFLAGS': ['-ansi'],
       'CCFLAGS':      ['$DIALECTFLAGS', '$WARNINGFLAGS',
           '-fno-strict-aliasing'],
-      'CXXFLAGS':     ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
+      'CXXFLAGS':     ['-fno-rtti', '-fno-exceptions'],
       'LIBS':         ['pthread']
     },
     'mode:debug': {
@@ -454,6 +454,7 @@ def BuildSpecific(env, mode, env_overrides):
   )
   
   # Link the object files into a library.
+  env.Replace(**context.flags['v8'])
   context.ApplyEnvOverrides(env)
   if context.options['library'] == 'static':
     library = env.StaticLibrary(library_name, object_files)