Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: src/SConscript

Issue 7066048: Compress sources of JS libraries in addition to the snapshot. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/SConscript
diff --git a/src/SConscript b/src/SConscript
index 68a7d560c8b06052add711018e68e10b4bf53344..ccc9cd4e709855107d7de327c4e132f42df878ef 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -316,11 +316,17 @@ def ConfigureObjectFiles():
else:
env['BUILDERS']['Snapshot'] = Builder(action='$SOURCE $TARGET')
+ def BuildJS2CEnv(type):
+ js2c_env = { 'TYPE': type, 'COMPRESSION': 'off' }
+ if 'COMPRESS_STARTUP_DATA_BZ2' in env['CPPDEFINES']:
+ js2c_env['COMPRESSION'] = 'bz2'
+ return js2c_env
+
# Build the standard platform-independent source files.
source_files = context.GetRelevantSources(SOURCES)
d8_files = context.GetRelevantSources(D8_FILES)
- d8_js = env.JS2C('d8-js.cc', 'd8.js', TYPE='D8')
+ d8_js = env.JS2C('d8-js.cc', 'd8.js', **{'TYPE': 'D8', 'COMPRESSION': 'off'})
d8_js_obj = context.ConfigureObject(env, d8_js, CPPPATH=['.'])
d8_objs = [context.ConfigureObject(env, [d8_files]), d8_js_obj]
@@ -328,14 +334,14 @@ def ConfigureObjectFiles():
# compile it.
library_files = [s for s in LIBRARY_FILES]
library_files.append('macros.py')
- libraries_src = env.JS2C(['libraries.cc'], library_files, TYPE='CORE')
+ libraries_src = env.JS2C(['libraries.cc'], library_files, **BuildJS2CEnv('CORE'))
Vitaly Repeshko 2011/06/06 10:08:23 It's already a lost cause but let's try to fit lin
mnaganov (inactive) 2011/06/06 13:40:18 Done.
libraries_obj = context.ConfigureObject(env, libraries_src, CPPPATH=['.'])
# Combine the experimental JavaScript library files into a C++ file
# and compile it.
experimental_library_files = [ s for s in EXPERIMENTAL_LIBRARY_FILES ]
experimental_library_files.append('macros.py')
- experimental_libraries_src = env.JS2C(['experimental-libraries.cc'], experimental_library_files, TYPE='EXPERIMENTAL')
+ experimental_libraries_src = env.JS2C(['experimental-libraries.cc'], experimental_library_files, **BuildJS2CEnv('EXPERIMENTAL'))
experimental_libraries_obj = context.ConfigureObject(env, experimental_libraries_src, CPPPATH=['.'])
source_objs = context.ConfigureObject(env, source_files)

Powered by Google App Engine
This is Rietveld 408576698