Commit 211751f8 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Apply the flags to the SCons environment used to link the library to have the

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
parent 32cf7fd9
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment