| OLD | NEW |
| 1 # Copyright 2009, Google Inc. | 1 # Copyright 2009, Google Inc. |
| 2 # All rights reserved. | 2 # All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 if env.Bit('windows'): | 44 if env.Bit('windows'): |
| 45 script_suffix = '.bat' | 45 script_suffix = '.bat' |
| 46 else: | 46 else: |
| 47 script_suffix = '.sh' | 47 script_suffix = '.sh' |
| 48 | 48 |
| 49 env = env.Clone( | 49 env = env.Clone( |
| 50 V8_MODE = 'release', | 50 V8_MODE = 'release', |
| 51 V8_MODE_DIR = '$V8_SRC_DIR/obj/$V8_MODE', | 51 V8_MODE_DIR = '$V8_SRC_DIR/obj/$V8_MODE', |
| 52 V8_SCONS_COM = '$PYTHON $SCONS -C $V8_SRC_DIR -f SConstruct ' | 52 V8_SCONS_COM = '$PYTHON $SCONS -C $V8_SRC_DIR -f SConstruct ' |
| 53 '$DEBUG_OPTS mode=$V8_MODE importenv=INCLUDE,LIB', | 53 '$DEBUG_OPTS mode=$V8_MODE importenv=INCLUDE,LIB,CCFLAGS', |
| 54 SCONS = '$SCONS_DIR/scons.py', | 54 SCONS = '$SCONS_DIR/scons.py', |
| 55 DEBUG_OPTS = ['--debug=%s' % item for item in GetOption('debug')] | 55 DEBUG_OPTS = ['--debug=%s' % item for item in GetOption('debug')] |
| 56 ) | 56 ) |
| 57 | 57 |
| 58 # Rather than build v8 with our own commands, we just shell out to v8's | 58 # Rather than build v8 with our own commands, we just shell out to v8's |
| 59 # own SCons-based build, since their build system is complicated. | 59 # own SCons-based build, since their build system is complicated. |
| 60 # This SConscript just declares dependencies on the outputs of that build. | 60 # This SConscript just declares dependencies on the outputs of that build. |
| 61 | 61 |
| 62 mksnapshot_exe = env.File('$V8_MODE_DIR/mksnapshot${PROGSUFFIX}') | 62 mksnapshot_exe = env.File('$V8_MODE_DIR/mksnapshot${PROGSUFFIX}') |
| 63 libraries_obj = env.File('$V8_MODE_DIR/libraries${OBJSUFFIX}') | 63 libraries_obj = env.File('$V8_MODE_DIR/libraries${OBJSUFFIX}') |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 v8_env['ENV']['INCLUDE'] = include_path | 102 v8_env['ENV']['INCLUDE'] = include_path |
| 103 | 103 |
| 104 lib_path = ";".join( | 104 lib_path = ";".join( |
| 105 [v8_env.subst("$PLATFORM_SDK_VISTA_6_0_DIR/Lib"), | 105 [v8_env.subst("$PLATFORM_SDK_VISTA_6_0_DIR/Lib"), |
| 106 v8_env.subst("$LIB")]) | 106 v8_env.subst("$LIB")]) |
| 107 | 107 |
| 108 try: | 108 try: |
| 109 v8_env['ENV']['LIB'] = lib_path + ";" + v8_env['ENV']['LIB'] | 109 v8_env['ENV']['LIB'] = lib_path + ";" + v8_env['ENV']['LIB'] |
| 110 except KeyError: | 110 except KeyError: |
| 111 v8_env['ENV']['LIB'] = lib_path | 111 v8_env['ENV']['LIB'] = lib_path |
| 112 elif v8_env.Bit('linux'): |
| 113 v8_env['ENV']['CCFLAGS'] = '-fvisibility=hidden' |
| 112 | 114 |
| 113 v8_no_snapshot = v8_env.Command( | 115 v8_no_snapshot = v8_env.Command( |
| 114 v8_scons_targets_no_snapshot, | 116 v8_scons_targets_no_snapshot, |
| 115 [], | 117 [], |
| 116 ['$V8_SCONS_COM msvcltcg=off snapshot=off sample=shell']) | 118 ['$V8_SCONS_COM msvcltcg=off snapshot=off sample=shell']) |
| 117 | 119 |
| 118 v8_snapshot = v8_env.Command( | 120 v8_snapshot = v8_env.Command( |
| 119 v8_scons_targets_snapshot, | 121 v8_scons_targets_snapshot, |
| 120 [], | 122 [], |
| 121 ['$V8_SCONS_COM msvcltcg=off snapshot=on']) | 123 ['$V8_SCONS_COM msvcltcg=off snapshot=on']) |
| 122 | 124 |
| 123 v8_env.AlwaysBuild(v8_no_snapshot) | 125 v8_env.AlwaysBuild(v8_no_snapshot) |
| 124 v8_env.AlwaysBuild(v8_snapshot) | 126 v8_env.AlwaysBuild(v8_snapshot) |
| 125 | 127 |
| 126 # Tell our SCons invocation to *not* delete v8.lib and the other targets | 128 # Tell our SCons invocation to *not* delete v8.lib and the other targets |
| 127 # before building them, so the subsidiary v8 SCons call doesn't always | 129 # before building them, so the subsidiary v8 SCons call doesn't always |
| 128 # rebuild them (thereby causing us to always rebuild their dependents). | 130 # rebuild them (thereby causing us to always rebuild their dependents). |
| 129 v8_env.Precious(v8_no_snapshot) | 131 v8_env.Precious(v8_no_snapshot) |
| 130 v8_env.Precious(v8_snapshot) | 132 v8_env.Precious(v8_snapshot) |
| 131 | 133 |
| 132 v8_env.Install('$LIB_DIR', v8_lib) | 134 v8_env.Install('$LIB_DIR', v8_lib) |
| OLD | NEW |