diff options
author | Kristian Monsen <kristianm@google.com> | 2010-10-25 19:59:22 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-10-25 20:01:15 +0100 |
commit | 154e8832fadff77ef15097ae99ee3626a7ceda2e (patch) | |
tree | bb22339d91adadabc39dbf5d466d658b6ab78d3b /build | |
parent | 2a71d90e1b494a38ea1ee526b548cc02aaafb064 (diff) | |
download | external_chromium-154e8832fadff77ef15097ae99ee3626a7ceda2e.zip external_chromium-154e8832fadff77ef15097ae99ee3626a7ceda2e.tar.gz external_chromium-154e8832fadff77ef15097ae99ee3626a7ceda2e.tar.bz2 |
Syncing external/chromium with chromium release 61029, build
Just adding and removing unused files.
There are some local changse after this, in build_config.h where
we have added some options for ANDROID, will try to upstream, and
the Makefiles are generated and contain the directory they were
generated in.
Change-Id: Ie42941dae731fe3cf9732cc46a9a557e00098c08
Diffstat (limited to 'build')
-rw-r--r-- | build/All.scons | 898 | ||||
-rw-r--r-- | build/SConstruct | 2 | ||||
-rw-r--r-- | build/all_main.scons | 529 | ||||
-rw-r--r-- | build/dir_exists.py | 10 | ||||
-rw-r--r-- | build/extract_from_cab.py | 27 | ||||
-rwxr-xr-x | build/install-chroot.sh | 221 | ||||
-rw-r--r-- | build/linux/SConstruct | 2 | ||||
-rw-r--r-- | build/linux/libresolv.target.mk | 5 | ||||
-rw-r--r-- | build/linux/openssl.target.mk | 5 | ||||
-rw-r--r-- | build/linux/system_main.scons | 327 | ||||
-rw-r--r-- | build/temp_gyp/SConstruct | 2 | ||||
-rw-r--r-- | build/temp_gyp/googleurl.scons | 343 | ||||
-rw-r--r-- | build/temp_gyp/googleurl_main.scons | 339 | ||||
-rw-r--r-- | build/temp_gyp/googleurl_unittests.scons | 421 | ||||
-rw-r--r-- | build/util/SConstruct | 2 | ||||
-rw-r--r-- | build/util/build_util_main.scons | 326 | ||||
-rw-r--r-- | build/util/lastchange.scons | 278 |
17 files changed, 268 insertions, 3469 deletions
diff --git a/build/All.scons b/build/All.scons deleted file mode 100644 index dc7e7db..0000000 --- a/build/All.scons +++ /dev/null @@ -1,898 +0,0 @@ -# This file is generated; do not edit. - -import os - -Import("env") - -env = env.Clone(COMPONENT_NAME='all', - TARGET_NAME='All') - -configurations = { - 'Release' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-pthread', - '-D_REENTRANT', - '-I/usr/include/gtk-2.0', - '-I/usr/lib/gtk-2.0/include', - '-I/usr/include/atk-1.0', - '-I/usr/include/cairo', - '-I/usr/include/pango-1.0', - '-I/usr/include/gio-unix-2.0/', - '-I/usr/include/glib-2.0', - '-I/usr/lib/glib-2.0/include', - '-I/usr/include/pixman-1', - '-I/usr/include/freetype2', - '-I/usr/include/directfb', - '-I/usr/include/libpng12', - '-I/usr/include/libpng12', - '-O2', - '-fno-ident', - '-fdata-sections', - '-ffunction-sections', - '-fno-asynchronous-unwind-tables' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'GLEW_STATIC', - 'GL_GLEXT_PROTOTYPES', - 'PERF_TEST', - 'GOOGLE_PROTOBUF_NO_RTTI', - 'CLD_WINDOWS', - '__OMX_EXPORTS', - 'UNIT_TEST', - 'GTEST_HAS_RTTI=0', - 'USE_SYSTEM_LIBBZ2', - 'COMPILER_GCC', - '__STDC_CONSTANT_MACROS', - 'U_STATIC_IMPLEMENTATION', - 'USE_SYSTEM_LIBJPEG', - 'USE_SYSTEM_LIBPNG', - 'LIBXML_STATIC', - 'LIBXSLT_STATIC', - '_LZMA_IN_CB', - 'USE_SYSTEM_ZLIB', - 'ENABLE_3D_CANVAS=1', - 'ENABLE_CHANNEL_MESSAGING=1', - 'ENABLE_DATABASE=1', - 'ENABLE_DATAGRID=0', - 'ENABLE_OFFLINE_WEB_APPLICATIONS=1', - 'ENABLE_DASHBOARD_SUPPORT=0', - 'ENABLE_DOM_STORAGE=1', - 'ENABLE_INDEXED_DATABASE=1', - 'ENABLE_FILTERS=1', - 'ENABLE_GEOLOCATION=1', - 'ENABLE_JAVASCRIPT_DEBUGGER=0', - 'ENABLE_JSC_MULTIPLE_THREADS=0', - 'ENABLE_ICONDATABASE=0', - 'ENABLE_NOTIFICATIONS=1', - 'ENABLE_OPENTYPE_SANITIZER=1', - 'ENABLE_ORIENTATION_EVENTS=0', - 'ENABLE_XSLT=1', - 'ENABLE_XPATH=1', - 'ENABLE_SHARED_WORKERS=1', - 'ENABLE_SVG=1', - 'ENABLE_SVG_ANIMATION=1', - 'ENABLE_SVG_AS_IMAGE=1', - 'ENABLE_SVG_USE=1', - 'ENABLE_SVG_FOREIGN_OBJECT=1', - 'ENABLE_SVG_FONTS=1', - 'ENABLE_VIDEO=1', - 'ENABLE_WEB_SOCKETS=1', - 'ENABLE_WORKERS=1', - 'BUILDING_CHROMIUM__=1', - 'USE_SYSTEM_MALLOC=1', - 'WTF_USE_PTHREADS=1', - 'NDEBUG', - 'NVALGRIND' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/../third_party/icu/public/i18n'), - env.Dir('$SRC_DIR/build/..'), - env.Dir('$SRC_DIR/build/../gpu/command_buffer/common'), - env.Dir('$SRC_DIR/build/../third_party/glew/include'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_locale_settings'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_strings'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_resources'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/chrome'), - env.Dir('$SRC_DIR/build/../third_party/protobuf2'), - env.Dir('$SRC_DIR/build/../third_party/protobuf2/src/src'), - env.Dir('$SRC_DIR/build/../third_party/openmax/il'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/net'), - env.Dir('$SRC_DIR/build/../sdch/open-vcdiff/src'), - env.Dir('$SRC_DIR/build/../skia/config'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/config'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/core'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/effects'), - env.Dir('$SRC_DIR/build/../skia/ext'), - env.Dir('$SRC_DIR/build/../third_party/harfbuzz/src'), - env.Dir('$SRC_DIR/build/../third_party/harfbuzz/contrib'), - env.Dir('$SRC_DIR/build/../testing/gmock/include'), - env.Dir('$SRC_DIR/build/../testing/gtest/include'), - env.Dir('$SRC_DIR/build/../third_party/ffmpeg/include'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/ffmpeg'), - env.Dir('$SRC_DIR/build/../third_party/libxml/linux/include'), - env.Dir('$SRC_DIR/build/../third_party/libxml/include'), - env.Dir('$SRC_DIR/build/../third_party/libxslt'), - env.Dir('$SRC_DIR/build/../third_party/lzma_sdk'), - env.Dir('$SRC_DIR/build/../third_party/npapi'), - env.Dir('$SRC_DIR/build/../third_party/npapi/bindings'), - env.Dir('$SRC_DIR/build/../third_party/ots/include'), - env.Dir('$SRC_DIR/build/../third_party/sqlite/preprocessed'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/accessibility'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/accessibility/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/generic'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8/custom'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8/specialization'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bridge'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/css'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/dom'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/dom/default'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/editing'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/history'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/html'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/html/canvas'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/inspector'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/appcache'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/archive'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/icon'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/notifications'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/filters'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/opentype'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/transforms'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/bmp'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/gif'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/ico'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/jpeg'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/png'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/xbm'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-encoders/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/mock'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/network'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/network/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/sql'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/text'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/plugins'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/plugins/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/rendering'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/rendering/style'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/storage'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/storage/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/graphics'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/graphics/filters'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/websockets'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/workers'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/xml'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/webkit'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/webkit/bindings'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/JavaScriptCore'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/JavaScriptCore/wtf'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/test_shell'), - env.Dir('$SRC_DIR/build/../v8/include') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-L$TOP_BUILDDIR', - '-Wl,--gc-sections' - ], - LIBS = [ - '-lX11', - 'libapp_base', - 'libbase_i18n', - 'libtest_support_base', - 'libtest_support_perf', - 'libbase', - 'liblinux_versioninfo', - 'libsymbolize', - 'libxdg_mime', - 'libdebugger', - 'libplugin', - 'libutility', - 'libprofile_import', - 'libchrome_gpu', - 'libworker', - 'libsyncapi', - 'libnotifier', - 'libsync', - 'libbrowser', - 'libcommon', - 'librenderer', - 'libtest_support_common', - 'libtest_support_ui', - 'libtest_support_unit', - 'libcommon_constants', - 'libnacl', - 'libconvert_dict', - 'libipc', - 'libmedia', - 'libomx_wrapper', - 'libnet_base', - 'libnet', - 'libnet_test_support', - 'libprinting', - 'libsdch', - 'libskia', - 'libskia_opts', - 'libgmock', - 'libgmockmain', - 'libgtest', - 'libgtestmain', - 'libcld', - 'libffmpeg', - 'libffmpegsumo', - 'libicudata', - 'libicui18n', - 'libicuuc', - 'libxml2', - 'libxslt', - 'liblzma_sdk', - 'libmodp_b64', - 'libots', - 'libsqlite3', - 'libwebkit', - 'libzlib', - 'libpepper_test_plugin', - 'libtest_shell_common', - 'libappcache', - 'libdatabase', - 'libglue', - 'libgoogleurl', - 'libv8_snapshot', - 'libv8_nosnapshot', - 'libv8_base', - 'libgenperf_libs', - 'libbreakpad_client', - 'libcourgette_lib', - 'libsandbox', - 'libssl', - 'libevent' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, - 'Debug' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-pthread', - '-D_REENTRANT', - '-I/usr/include/gtk-2.0', - '-I/usr/lib/gtk-2.0/include', - '-I/usr/include/atk-1.0', - '-I/usr/include/cairo', - '-I/usr/include/pango-1.0', - '-I/usr/include/gio-unix-2.0/', - '-I/usr/include/glib-2.0', - '-I/usr/lib/glib-2.0/include', - '-I/usr/include/pixman-1', - '-I/usr/include/freetype2', - '-I/usr/include/directfb', - '-I/usr/include/libpng12', - '-I/usr/include/libpng12', - '-O0', - '-g' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'GLEW_STATIC', - 'GL_GLEXT_PROTOTYPES', - 'PERF_TEST', - 'GOOGLE_PROTOBUF_NO_RTTI', - 'CLD_WINDOWS', - '__OMX_EXPORTS', - 'UNIT_TEST', - 'GTEST_HAS_RTTI=0', - 'USE_SYSTEM_LIBBZ2', - 'COMPILER_GCC', - '__STDC_CONSTANT_MACROS', - 'U_STATIC_IMPLEMENTATION', - 'USE_SYSTEM_LIBJPEG', - 'USE_SYSTEM_LIBPNG', - 'LIBXML_STATIC', - 'LIBXSLT_STATIC', - '_LZMA_IN_CB', - 'USE_SYSTEM_ZLIB', - 'ENABLE_3D_CANVAS=1', - 'ENABLE_CHANNEL_MESSAGING=1', - 'ENABLE_DATABASE=1', - 'ENABLE_DATAGRID=0', - 'ENABLE_OFFLINE_WEB_APPLICATIONS=1', - 'ENABLE_DASHBOARD_SUPPORT=0', - 'ENABLE_DOM_STORAGE=1', - 'ENABLE_INDEXED_DATABASE=1', - 'ENABLE_FILTERS=1', - 'ENABLE_GEOLOCATION=1', - 'ENABLE_JAVASCRIPT_DEBUGGER=0', - 'ENABLE_JSC_MULTIPLE_THREADS=0', - 'ENABLE_ICONDATABASE=0', - 'ENABLE_NOTIFICATIONS=1', - 'ENABLE_OPENTYPE_SANITIZER=1', - 'ENABLE_ORIENTATION_EVENTS=0', - 'ENABLE_XSLT=1', - 'ENABLE_XPATH=1', - 'ENABLE_SHARED_WORKERS=1', - 'ENABLE_SVG=1', - 'ENABLE_SVG_ANIMATION=1', - 'ENABLE_SVG_AS_IMAGE=1', - 'ENABLE_SVG_USE=1', - 'ENABLE_SVG_FOREIGN_OBJECT=1', - 'ENABLE_SVG_FONTS=1', - 'ENABLE_VIDEO=1', - 'ENABLE_WEB_SOCKETS=1', - 'ENABLE_WORKERS=1', - 'BUILDING_CHROMIUM__=1', - 'USE_SYSTEM_MALLOC=1', - 'WTF_USE_PTHREADS=1', - '_DEBUG' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/../third_party/icu/public/i18n'), - env.Dir('$SRC_DIR/build/..'), - env.Dir('$SRC_DIR/build/../gpu/command_buffer/common'), - env.Dir('$SRC_DIR/build/../third_party/glew/include'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_locale_settings'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_strings'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/app/app_resources'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/chrome'), - env.Dir('$SRC_DIR/build/../third_party/protobuf2'), - env.Dir('$SRC_DIR/build/../third_party/protobuf2/src/src'), - env.Dir('$SRC_DIR/build/../third_party/openmax/il'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/net'), - env.Dir('$SRC_DIR/build/../sdch/open-vcdiff/src'), - env.Dir('$SRC_DIR/build/../skia/config'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/config'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/core'), - env.Dir('$SRC_DIR/build/../third_party/skia/include/effects'), - env.Dir('$SRC_DIR/build/../skia/ext'), - env.Dir('$SRC_DIR/build/../third_party/harfbuzz/src'), - env.Dir('$SRC_DIR/build/../third_party/harfbuzz/contrib'), - env.Dir('$SRC_DIR/build/../testing/gmock/include'), - env.Dir('$SRC_DIR/build/../testing/gtest/include'), - env.Dir('$SRC_DIR/build/../third_party/ffmpeg/include'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/ffmpeg'), - env.Dir('$SRC_DIR/build/../third_party/libxml/linux/include'), - env.Dir('$SRC_DIR/build/../third_party/libxml/include'), - env.Dir('$SRC_DIR/build/../third_party/libxslt'), - env.Dir('$SRC_DIR/build/../third_party/lzma_sdk'), - env.Dir('$SRC_DIR/build/../third_party/npapi'), - env.Dir('$SRC_DIR/build/../third_party/npapi/bindings'), - env.Dir('$SRC_DIR/build/../third_party/ots/include'), - env.Dir('$SRC_DIR/build/../third_party/sqlite/preprocessed'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/accessibility'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/accessibility/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/generic'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8/custom'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bindings/v8/specialization'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/bridge'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/css'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/dom'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/dom/default'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/editing'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/history'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/html'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/html/canvas'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/inspector'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/appcache'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/archive'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/loader/icon'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/notifications'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/page/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/filters'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/opentype'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/graphics/transforms'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/bmp'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/gif'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/ico'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/jpeg'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/png'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-decoders/xbm'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/image-encoders/skia'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/mock'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/network'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/network/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/sql'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/platform/text'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/plugins'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/plugins/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/rendering'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/rendering/style'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/storage'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/storage/chromium'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/animation'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/graphics'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/svg/graphics/filters'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/websockets'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/workers'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/WebCore/xml'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/webkit'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/webkit/bindings'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/JavaScriptCore'), - env.Dir('$SRC_DIR/build/../third_party/WebKit/JavaScriptCore/wtf'), - env.Dir('${SHARED_INTERMEDIATE_DIR}/test_shell'), - env.Dir('$SRC_DIR/build/../v8/include') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-L$TOP_BUILDDIR', - '-rdynamic' - ], - LIBS = [ - '-lX11', - 'libapp_base', - 'libbase_i18n', - 'libtest_support_base', - 'libtest_support_perf', - 'libbase', - 'liblinux_versioninfo', - 'libsymbolize', - 'libxdg_mime', - 'libdebugger', - 'libplugin', - 'libutility', - 'libprofile_import', - 'libchrome_gpu', - 'libworker', - 'libsyncapi', - 'libnotifier', - 'libsync', - 'libbrowser', - 'libcommon', - 'librenderer', - 'libtest_support_common', - 'libtest_support_ui', - 'libtest_support_unit', - 'libcommon_constants', - 'libnacl', - 'libconvert_dict', - 'libipc', - 'libmedia', - 'libomx_wrapper', - 'libnet_base', - 'libnet', - 'libnet_test_support', - 'libprinting', - 'libsdch', - 'libskia', - 'libskia_opts', - 'libgmock', - 'libgmockmain', - 'libgtest', - 'libgtestmain', - 'libcld', - 'libffmpeg', - 'libffmpegsumo', - 'libicudata', - 'libicui18n', - 'libicuuc', - 'libxml2', - 'libxslt', - 'liblzma_sdk', - 'libmodp_b64', - 'libots', - 'libsqlite3', - 'libwebkit', - 'libzlib', - 'libpepper_test_plugin', - 'libtest_shell_common', - 'libappcache', - 'libdatabase', - 'libglue', - 'libgoogleurl', - 'libv8_snapshot', - 'libv8_nosnapshot', - 'libv8_base', - 'libgenperf_libs', - 'libbreakpad_client', - 'libcourgette_lib', - 'libsandbox', - 'libssl', - 'libevent' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, -} - -config = configurations[env['CONFIG_NAME']] -env.Append(**config['Append']) -env.FilterOut(**config['FilterOut']) -env.Replace(**config['Replace']) - -# Scons forces -fPIC for SHCCFLAGS on some platforms. -# Disable that so we can control it from cflags in gyp. -# Note that Scons itself is inconsistent with its -fPIC -# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. -# This will make SHCCFLAGS consistent with SHCFLAGS. -env['SHCCFLAGS'] = ['$CCFLAGS'] - -for _var in config['ImportExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env[_var] = os.environ[_var] -for _var in config['PropagateExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env['ENV'][_var] = os.environ[_var] - -env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') - -if ARGUMENTS.get('COVERAGE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-fprofile-arcs', - '-ftest-coverage' - ], - LINKFLAGS = [ - '-fprofile-arcs' - ], - ) - -if ARGUMENTS.get('PROFILE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-pg', - '-g' - ], - LINKFLAGS = [ - '-pg' - ], - ) - -if ARGUMENTS.get('SYMBOLS') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-g' - ], - ) - -input_files = [] - -target_files = [] -prerequisites = [] - -target_files.extend(input_files) - -gyp_target = env.Alias('All', target_files) -dependencies = [ - Alias('app_unittests'), - Alias('app_strings'), - Alias('app_resources'), - Alias('app_base'), - Alias('base_i18n'), - Alias('base_unittests'), - Alias('test_support_base'), - Alias('test_support_perf'), - Alias('base'), - Alias('linux_versioninfo'), - Alias('symbolize'), - Alias('xdg_mime'), - Alias('chrome_resources'), - Alias('chrome_strings'), - Alias('theme_resources'), - Alias('platform_locale_settings'), - Alias('default_extensions'), - Alias('debugger'), - Alias('plugin'), - Alias('utility'), - Alias('profile_import'), - Alias('chrome_gpu'), - Alias('worker'), - Alias('syncapi'), - Alias('sync_proto'), - Alias('notifier'), - Alias('sync'), - Alias('browser'), - Alias('common'), - Alias('chrome'), - Alias('renderer'), - Alias('test_support_common'), - Alias('test_support_ui'), - Alias('test_support_unit'), - Alias('automated_ui_tests'), - Alias('ui_tests'), - Alias('nacl_ui_tests'), - Alias('unit_tests'), - Alias('browser_tests'), - Alias('startup_tests'), - Alias('reliability_tests'), - Alias('page_cycler_tests'), - Alias('tab_switching_test'), - Alias('memory_test'), - Alias('url_fetch_test'), - Alias('sync_unit_tests'), - Alias('sync_integration_tests'), - Alias('common_constants'), - Alias('nacl'), - Alias('convert_dict'), - Alias('convert_dict_lib'), - Alias('flush_cache'), - Alias('linux_symbols'), - Alias('packed_resources'), - Alias('perf_tests'), - Alias('interactive_ui_tests'), - Alias('ipc_tests'), - Alias('ipc'), - Alias('media'), - Alias('media_unittests'), - Alias('media_bench'), - Alias('wav_ola_test'), - Alias('qt_faststart'), - Alias('omx_test'), - Alias('omx_unittests'), - Alias('omx_wrapper'), - Alias('player_x11'), - Alias('net_base'), - Alias('net'), - Alias('net_unittests'), - Alias('net_perftests'), - Alias('stress_cache'), - Alias('tld_cleanup'), - Alias('crash_cache'), - Alias('net_test_support'), - Alias('net_resources'), - Alias('fetch_client'), - Alias('fetch_server'), - Alias('hresolv'), - Alias('printing'), - Alias('printing_unittests'), - Alias('sdch'), - Alias('skia'), - Alias('skia_opts'), - Alias('gmock'), - Alias('gmockmain'), - Alias('gtest'), - Alias('gtestmain'), - Alias('bzip2'), - Alias('cld'), - Alias('codesighs'), - Alias('maptsvdifftool'), - Alias('nm2tsv'), - Alias('ffmpeg'), - Alias('ffmpeg_binaries'), - Alias('ffmpegsumo'), - Alias('assemble_ffmpeg_asm'), - Alias('make_ffmpeg_asm_lib'), - Alias('ffmpegsumo_nolink'), - Alias('icudata'), - Alias('icui18n'), - Alias('icuuc'), - Alias('libjpeg'), - Alias('libpng'), - Alias('libxml'), - Alias('libxslt'), - Alias('lzma_sdk'), - Alias('modp_b64'), - Alias('npapi'), - Alias('ots'), - Alias('sqlite'), - Alias('sqlite_shell'), - Alias('webkit'), - Alias('webkit_unit_tests'), - Alias('zlib'), - Alias('pepper_test_plugin'), - Alias('test_shell_common'), - Alias('test_shell_pak'), - Alias('test_shell'), - Alias('test_shell_tests'), - Alias('npapi_layout_test_plugin'), - Alias('test_shell_resources'), - Alias('pull_in_test_shell'), - Alias('pull_in_webkit_unit_tests'), - Alias('webkit_resources'), - Alias('webkit_strings'), - Alias('appcache'), - Alias('database'), - Alias('glue'), - Alias('inspector_resources'), - Alias('devtools_html'), - Alias('concatenated_devtools_js'), - Alias('lastchange'), - Alias('googleurl'), - Alias('googleurl_unittests'), - Alias('v8'), - Alias('v8_snapshot'), - Alias('v8_nosnapshot'), - Alias('v8_base'), - Alias('js2c'), - Alias('mksnapshot'), - Alias('v8_shell'), - Alias('yasm'), - Alias('config_sources'), - Alias('generate_files'), - Alias('genperf_libs'), - Alias('genstring'), - Alias('genperf'), - Alias('genmacro'), - Alias('genversion'), - Alias('re2c'), - Alias('genmodule'), - Alias('breakpad_client'), - Alias('breakpad_unittests'), - Alias('generate_test_dump'), - Alias('courgette_lib'), - Alias('courgette'), - Alias('courgette_minimal_tool'), - Alias('courgette_unittests'), - Alias('courgette_fuzz'), - Alias('chrome_sandbox'), - Alias('sandbox'), - Alias('gtk_clipboard_dump'), - Alias('xdisplaycheck'), - Alias('ssl'), - Alias('libevent') -] -env.Requires(target_files, dependencies) -env.Requires(gyp_target, dependencies) -for prerequisite in prerequisites: - env.Requires(prerequisite, dependencies) -env.Requires(gyp_target, prerequisites) -Return("gyp_target") diff --git a/build/SConstruct b/build/SConstruct deleted file mode 100644 index 87375e1..0000000 --- a/build/SConstruct +++ /dev/null @@ -1,2 +0,0 @@ -# This file is generated; do not edit. -SConscript('all_main.scons') diff --git a/build/all_main.scons b/build/all_main.scons deleted file mode 100644 index b1a9251..0000000 --- a/build/all_main.scons +++ /dev/null @@ -1,529 +0,0 @@ -# This file is generated; do not edit. - -__doc__ = ''' -Wrapper configuration for building this entire "solution," -including all the specific targets in various *.scons files. -''' - -import os -import sys - -import SCons.Environment -import SCons.Util - -def GetProcessorCount(): - ''' - Detects the number of CPUs on the system. Adapted form: - http://codeliberates.blogspot.com/2008/05/detecting-cpuscores-in-python.html - ''' - # Linux, Unix and Mac OS X: - if hasattr(os, 'sysconf'): - if os.sysconf_names.has_key('SC_NPROCESSORS_ONLN'): - # Linux and Unix or Mac OS X with python >= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\r', '|\r', '\\\r', '-\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = dict( - All = 'All.scons', - app_base = '../app/app_base.scons', - app_resources = '../app/app_resources.scons', - app_strings = '../app/app_strings.scons', - app_unittests = '../app/app_unittests.scons', - appcache = '../webkit/appcache.scons', - assemble_ffmpeg_asm = '../third_party/ffmpeg/assemble_ffmpeg_asm.scons', - automated_ui_tests = '../chrome/automated_ui_tests.scons', - base = '../base/base.scons', - base_i18n = '../base/base_i18n.scons', - base_unittests = '../base/base_unittests.scons', - breakpad_client = '../breakpad/breakpad_client.scons', - breakpad_unittests = '../breakpad/breakpad_unittests.scons', - browser = '../chrome/browser.scons', - browser_tests = '../chrome/browser_tests.scons', - chrome = '../chrome/chrome.scons', - chrome_gpu = '../chrome/chrome_gpu.scons', - chrome_resources = '../chrome/chrome_resources.scons', - chrome_sandbox = '../sandbox/chrome_sandbox.scons', - chrome_strings = '../chrome/chrome_strings.scons', - cld = '../third_party/cld/cld.scons', - codesighs = '../third_party/codesighs/codesighs.scons', - command_buffer_common = '../gpu/command_buffer_common.scons', - command_buffer_service = '../gpu/command_buffer_service.scons', - command_buffer_service_impl = '../gpu/command_buffer_service_impl.scons', - common = '../chrome/common.scons', - common_constants = '../chrome/common_constants.scons', - concatenated_devtools_js = '../webkit/concatenated_devtools_js.scons', - config_sources = '../third_party/yasm/config_sources.scons', - convert_dict = '../chrome/convert_dict.scons', - convert_dict_lib = '../chrome/convert_dict_lib.scons', - courgette = '../courgette/courgette.scons', - courgette_fuzz = '../courgette/courgette_fuzz.scons', - courgette_lib = '../courgette/courgette_lib.scons', - courgette_minimal_tool = '../courgette/courgette_minimal_tool.scons', - courgette_unittests = '../courgette/courgette_unittests.scons', - crash_cache = '../net/crash_cache.scons', - database = '../webkit/database.scons', - debugger = '../chrome/debugger.scons', - default_extensions = '../chrome/default_extensions.scons', - devtools_html = '../webkit/devtools_html.scons', - expiration = '../native_client/src/trusted/service_runtime/expiration.scons', - fetch_client = '../net/fetch_client.scons', - fetch_server = '../net/fetch_server.scons', - ffmpeg = '../third_party/ffmpeg/ffmpeg.scons', - ffmpeg_binaries = '../third_party/ffmpeg/ffmpeg_binaries.scons', - ffmpegsumo = '../third_party/ffmpeg/ffmpegsumo.scons', - ffmpegsumo_nolink = '../third_party/ffmpeg/ffmpegsumo_nolink.scons', - flush_cache = '../chrome/flush_cache.scons', - generate_files = '../third_party/yasm/generate_files.scons', - generate_test_dump = '../breakpad/generate_test_dump.scons', - genmacro = '../third_party/yasm/genmacro.scons', - genmodule = '../third_party/yasm/genmodule.scons', - genperf = '../third_party/yasm/genperf.scons', - genperf_libs = '../third_party/yasm/genperf_libs.scons', - genstring = '../third_party/yasm/genstring.scons', - genversion = '../third_party/yasm/genversion.scons', - gio = '../native_client/src/trusted/gio/gio.scons', - gl_libs = '../gpu/gl_libs.scons', - glue = '../webkit/glue.scons', - gmock = '../testing/gmock.scons', - gmockmain = '../testing/gmockmain.scons', - google_nacl_npruntime = '../native_client/src/shared/npruntime/google_nacl_npruntime.scons', - googleurl = 'temp_gyp/googleurl.scons', - googleurl_unittests = 'temp_gyp/googleurl_unittests.scons', - gpu_plugin = '../gpu/gpu_plugin.scons', - gtest = '../testing/gtest.scons', - gtestmain = '../testing/gtestmain.scons', - gtk_clipboard_dump = '../tools/gtk_clipboard_dump/gtk_clipboard_dump.scons', - harfbuzz = '../third_party/harfbuzz/harfbuzz.scons', - harfbuzz_interface = '../third_party/harfbuzz/harfbuzz_interface.scons', - hresolv = '../net/hresolv.scons', - hunspell = '../third_party/hunspell/hunspell.scons', - icudata = '../third_party/icu/icudata.scons', - icui18n = '../third_party/icu/icui18n.scons', - icuuc = '../third_party/icu/icuuc.scons', - il = '../third_party/openmax/il.scons', - image_diff = '../tools/imagediff/image_diff.scons', - inspector_resources = '../webkit/inspector_resources.scons', - interactive_ui_tests = '../chrome/interactive_ui_tests.scons', - ipc = '../ipc/ipc.scons', - ipc_tests = '../ipc/ipc_tests.scons', - js2c = '../v8/tools/gyp/js2c.scons', - lastchange = 'util/lastchange.scons', - libevent = '../third_party/libevent/libevent.scons', - libgoogle_nacl_imc_c = '../native_client/src/shared/imc/libgoogle_nacl_imc_c.scons', - libjingle = '../third_party/libjingle/libjingle.scons', - libxml = '../third_party/libxml/libxml.scons', - libxslt = '../third_party/libxslt/libxslt.scons', - linux_symbols = '../chrome/linux_symbols.scons', - linux_versioninfo = '../base/linux_versioninfo.scons', - lzma_sdk = '../third_party/lzma_sdk/lzma_sdk.scons', - make_ffmpeg_asm_lib = '../third_party/ffmpeg/make_ffmpeg_asm_lib.scons', - maptsvdifftool = '../third_party/codesighs/maptsvdifftool.scons', - media = '../media/media.scons', - media_bench = '../media/media_bench.scons', - media_unittests = '../media/media_unittests.scons', - memory_test = '../chrome/memory_test.scons', - mksnapshot = '../v8/tools/gyp/mksnapshot.scons', - modp_b64 = '../third_party/modp_b64/modp_b64.scons', - nacl = '../chrome/nacl.scons', - nacl_ui_tests = '../chrome/nacl_ui_tests.scons', - ncdecode_table = '../native_client/src/trusted/validator_x86/ncdecode_table.scons', - ncdecode_tablegen = '../native_client/src/trusted/validator_x86/ncdecode_tablegen.scons', - ncopcode_utils = '../native_client/src/trusted/validator_x86/ncopcode_utils.scons', - ncopcode_utils_gen = '../native_client/src/trusted/validator_x86/ncopcode_utils_gen.scons', - ncvalidate = '../native_client/src/trusted/validator_x86/ncvalidate.scons', - net = '../net/net.scons', - net_base = '../net/net_base.scons', - net_perftests = '../net/net_perftests.scons', - net_resources = '../net/net_resources.scons', - net_test_support = '../net/net_test_support.scons', - net_unittests = '../net/net_unittests.scons', - nm2tsv = '../third_party/codesighs/nm2tsv.scons', - nonnacl_srpc = '../native_client/src/shared/srpc/nonnacl_srpc.scons', - nonnacl_util_chrome = '../native_client/src/trusted/nonnacl_util/nonnacl_util_chrome.scons', - nonnacl_util_linux = '../native_client/src/trusted/nonnacl_util/linux/nonnacl_util_linux.scons', - notifier = '../chrome/notifier.scons', - npGoogleNaClPluginChrome = '../native_client/src/trusted/plugin/npGoogleNaClPluginChrome.scons', - npapi = '../third_party/npapi/npapi.scons', - npapi_layout_test_plugin = '../webkit/tools/test_shell/npapi_layout_test_plugin.scons', - nrd_xfer = '../native_client/src/trusted/desc/nrd_xfer.scons', - omx_test = '../media/omx_test.scons', - omx_unittests = '../media/omx_unittests.scons', - omx_wrapper = '../media/omx_wrapper.scons', - ots = '../third_party/ots/ots.scons', - packed_resources = '../chrome/packed_resources.scons', - page_cycler_tests = '../chrome/page_cycler_tests.scons', - pcre = '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/pcre.scons', - pepper_test_plugin = '../webkit/tools/pepper_test_plugin/pepper_test_plugin.scons', - perf_tests = '../chrome/perf_tests.scons', - platform = '../native_client/src/shared/platform/platform.scons', - platform_locale_settings = '../chrome/platform_locale_settings.scons', - platform_qual_lib = '../native_client/src/trusted/platform_qualify/platform_qual_lib.scons', - player_x11 = '../media/player_x11.scons', - plugin = '../chrome/plugin.scons', - printing = '../printing/printing.scons', - printing_unittests = '../printing/printing_unittests.scons', - profile_import = '../chrome/profile_import.scons', - protobuf = '../third_party/protobuf2/protobuf.scons', - protobuf_lite = '../third_party/protobuf2/protobuf_lite.scons', - protoc = '../third_party/protobuf2/protoc.scons', - pull_in_test_shell = '../webkit/pull_in_test_shell.scons', - pull_in_webkit_unit_tests = '../webkit/pull_in_webkit_unit_tests.scons', - qt_faststart = '../media/qt_faststart.scons', - re2c = '../third_party/yasm/re2c.scons', - reliability_tests = '../chrome/reliability_tests.scons', - renderer = '../chrome/renderer.scons', - sandbox = '../sandbox/sandbox.scons', - sdch = '../sdch/sdch.scons', - sel = '../native_client/src/trusted/service_runtime/sel.scons', - sel_ldr_launcher = '../native_client/src/trusted/nonnacl_util/sel_ldr_launcher.scons', - service_runtime_x86 = '../native_client/src/trusted/service_runtime/arch/x86/service_runtime_x86.scons', - service_runtime_x86_64 = '../native_client/src/trusted/service_runtime/arch/x86_64/service_runtime_x86_64.scons', - skia = '../skia/skia.scons', - skia_opts = '../skia/skia_opts.scons', - sqlite = '../third_party/sqlite/sqlite.scons', - sqlite_shell = '../third_party/sqlite/sqlite_shell.scons', - ssl = '../net/third_party/nss/ssl.scons', - startup_tests = '../chrome/startup_tests.scons', - stress_cache = '../net/stress_cache.scons', - symbolize = '../base/symbolize.scons', - sync = '../chrome/sync.scons', - sync_integration_tests = '../chrome/sync_integration_tests.scons', - sync_proto = '../chrome/sync_proto.scons', - sync_unit_tests = '../chrome/sync_unit_tests.scons', - syncapi = '../chrome/syncapi.scons', - tab_switching_test = '../chrome/tab_switching_test.scons', - test_shell = '../webkit/tools/test_shell/test_shell.scons', - test_shell_common = '../webkit/tools/test_shell/test_shell_common.scons', - test_shell_pak = '../webkit/tools/test_shell/test_shell_pak.scons', - test_shell_resources = '../webkit/tools/test_shell/test_shell_resources.scons', - test_shell_tests = '../webkit/tools/test_shell/test_shell_tests.scons', - test_support_base = '../base/test_support_base.scons', - test_support_common = '../chrome/test_support_common.scons', - test_support_perf = '../base/test_support_perf.scons', - test_support_ui = '../chrome/test_support_ui.scons', - test_support_unit = '../chrome/test_support_unit.scons', - theme_resources = '../chrome/theme_resources.scons', - tld_cleanup = '../net/tld_cleanup.scons', - ui_tests = '../chrome/ui_tests.scons', - unit_tests = '../chrome/unit_tests.scons', - url_fetch_test = '../chrome/url_fetch_test.scons', - utility = '../chrome/utility.scons', - v8 = '../v8/tools/gyp/v8.scons', - v8_base = '../v8/tools/gyp/v8_base.scons', - v8_nosnapshot = '../v8/tools/gyp/v8_nosnapshot.scons', - v8_shell = '../v8/tools/gyp/v8_shell.scons', - v8_snapshot = '../v8/tools/gyp/v8_snapshot.scons', - wav_ola_test = '../media/wav_ola_test.scons', - webcore = '../third_party/WebKit/WebCore/WebCore.gyp/webcore.scons', - webcore_bindings = '../third_party/WebKit/WebCore/WebCore.gyp/webcore_bindings.scons', - webcore_bindings_sources = '../third_party/WebKit/WebCore/WebCore.gyp/webcore_bindings_sources.scons', - webkit = '../third_party/WebKit/WebKit/chromium/webkit.scons', - webkit_resources = '../webkit/webkit_resources.scons', - webkit_strings = '../webkit/webkit_strings.scons', - webkit_unit_tests = '../third_party/WebKit/WebKit/chromium/webkit_unit_tests.scons', - worker = '../chrome/worker.scons', - wtf = '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/wtf.scons', - wtf_config = '../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/wtf_config.scons', - xdg_mime = '../base/xdg_mime.scons', - xdisplaycheck = '../tools/xdisplaycheck/xdisplaycheck.scons', - yasm = '../third_party/yasm/yasm.scons', - zlib = '../third_party/zlib/zlib.scons', -) - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = ['Debug'] - -sconsbuild_dir = Dir('../sconsbuild') - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library(target, source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule(target, source, *args, **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary(target, source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir('..'), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%*s' % (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%-*s' % (colwidth, items[i])) - sep = '\n' + indent - result.append('\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt % columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) diff --git a/build/dir_exists.py b/build/dir_exists.py new file mode 100644 index 0000000..d1c194f --- /dev/null +++ b/build/dir_exists.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os.path +import sys + +sys.stdout.write(str(os.path.isdir(sys.argv[1]))) +sys.exit(0) diff --git a/build/extract_from_cab.py b/build/extract_from_cab.py new file mode 100644 index 0000000..fd99184 --- /dev/null +++ b/build/extract_from_cab.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Extracts a single file from a CAB archive. + +import os +import subprocess +import sys + +if len(sys.argv) != 4: + print 'Usage: extract_from_cab.py cab_path archived_file output_dir' + sys.exit(1) + +[cab_path, archived_file, output_dir] = sys.argv[1:] + +# Invoke the Windows expand utility to extract the file. +level = subprocess.call(['expand', cab_path, '-F:' + archived_file, output_dir]) +if level != 0: + sys.exit(level) + +# The expand utility preserves the modification date and time of the archived +# file. Touch the extracted file. This helps build systems that compare the +# modification times of input and output files to determine whether to do an +# action. +os.utime(os.path.join(output_dir, archived_file), None) diff --git a/build/install-chroot.sh b/build/install-chroot.sh new file mode 100755 index 0000000..ad0dafa --- /dev/null +++ b/build/install-chroot.sh @@ -0,0 +1,221 @@ +#!/bin/bash -e + +# Copyright (c) 2010 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This script installs Debian-derived distributions in a chroot environment. +# It can for example be used to have an accurate 32bit build and test +# environment when otherwise working on a 64bit machine. +# N. B. it is unlikely that this script will ever work on anything other than a +# Debian-derived system. + +# Check that we are running as a regular user +[ "$(id -nu)" = root ] && { + echo "Run this script as a regular user and provide your \"sudo\"" \ + "password if requested" >&2 + exit 1 +} +mkdir -p "$HOME/chroot/" + +# Error handler +trap 'exit 1' INT TERM QUIT +trap 'sudo apt-get clean; tput bel; echo; echo Failed' EXIT + +# Install any missing applications that this script relies on. If these packages +# are already installed, don't force another "apt-get install". That would +# prevent them from being auto-removed, if they ever become eligible for that. +# And as this script only needs the packages once, there is no good reason to +# introduce a hard dependency on things such as dchroot and debootstrap. +dep= +for i in dchroot debootstrap; do + [ -d /usr/share/doc/"$i" ] || dep="$dep $i" +done +[ -n "$dep" ] && sudo apt-get -y install $dep +sudo apt-get -y install schroot + +# Create directory for chroot +sudo mkdir -p /var/lib/chroot + +# Find chroot environments that can be installed with debootstrap +targets="$(cd /usr/share/debootstrap/scripts + ls | grep '^[a-z]*$')" + +# Ask user to pick one of the available targets +echo "The following targets are available to be installed in a chroot:" +j=1; for i in $targets; do + printf '%4d: %s\n' "$j" "$i" + j=$(($j+1)) +done +while :; do + printf "Which target would you like to install: " + read n + [ "$n" -gt 0 -a "$n" -lt "$j" ] >&/dev/null && break +done +j=1; for i in $targets; do + [ "$j" -eq "$n" ] && { distname="$i"; break; } + j=$(($j+1)) +done + +# On x86-64, ask whether the user wants to install x86-32 or x86-64 +archflag= +arch= +if [ "$(uname -m)" = x86_64 ]; then + while :; do + echo "You are running a 64bit kernel. This allows you to install either a" + printf "32bit or a 64bit chroot environment. %s" \ + "Which one do you want (32, 64) " + read arch + [ "${arch}" == 32 -o "${arch}" == 64 ] && break + done + [ "${arch}" == 32 ] && archflag="--arch i386" || archflag="--arch amd64" + arch="${arch}bit" +fi +target="${distname}${arch}" + +# Don't overwrite an existing installation +[ -d /var/lib/chroot/"${target}" ] && { + echo "This chroot already exists on your machine." >&2 + echo "Delete /var/lib/chroot/${target} if you want to start over." >&2 + exit 1 +} +sudo mkdir -p /var/lib/chroot/"${target}" + +# Remove stale entry from /etc/schroot/schroot.conf. Entries start +# with the target name in square brackets, followed by an arbitrary +# number of lines. The entry stops when either the end of file has +# been reached, or when the beginning of a new target is encountered. +# This means, we cannot easily match for a range of lines in +# "sed". Instead, we actually have to iterate over each line and check +# whether it is the beginning of a new entry. +sudo sed -ni '/^[[]'"${target%bit}"']$/,${:1;n;/^[[]/b2;b1;:2;p;n;b2};p' \ + /etc/schroot/schroot.conf + +# Download base system. This takes some time +grep ubuntu.com /usr/share/debootstrap/scripts/"${distname}" >&/dev/null && + mirror="http://archive.ubuntu.com/ubuntu" || + mirror="http://ftp.us.debian.org/debian" + sudo debootstrap ${archflag} "${distname}" /var/lib/chroot/"${target}" \ + "$mirror" + +# Add new entry to /etc/schroot/schroot.conf +grep ubuntu.com /usr/share/debootstrap/scripts/"${distname}" >&/dev/null && + brand="Ubuntu" || brand="Debian" +sudo sh -c 'cat >>/etc/schroot/schroot.conf' <<EOF +[${target%bit}] +description=${brand} ${distname} ${arch} +type=directory +directory=/var/lib/chroot/${target} +priority=3 +users=root +groups=admin +root-groups=admin +personality=linux$([ "${arch}" != 64bit ] && echo 32) +script-config=script-${target} + +EOF + +# Set up a special directory that changes contents depending on the target +# that is executing. +sed '/^FSTAB=/s,/mount-defaults",/mount-'"${target}"'",' \ + /etc/schroot/script-defaults | + sudo sh -c 'cat >/etc/schroot/script-'"${target}" +sudo cp /etc/schroot/mount-defaults /etc/schroot/mount-"${target}" +echo "$HOME/chroot/.${target} $HOME/chroot none rw,bind 0 0" | + sudo sh -c 'cat >>/etc/schroot/mount-'"${target}" +mkdir -p "$HOME/chroot/.${target}" + +# Install a helper script to launch commands in the chroot +sudo sh -c 'cat >/usr/local/bin/'"${target%bit}" <<EOF +#!/bin/bash +if [ \$# -eq 0 ]; then + exec schroot -c ${target%bit} -p +else + p="\$1"; shift + exec schroot -c ${target%bit} -p "\$p" -- "\$@" +fi +exit 1 +EOF +sudo chown root:root /usr/local/bin/"${target%bit}" +sudo chmod 755 /usr/local/bin/"${target%bit}" + +# Add a few more repositories to the chroot +[ -r /var/lib/chroot/${target}/etc/apt/sources.list ] && +sudo sed -i 's/ main$/ main restricted universe multiverse/ + p + t1 + d + :1;s/^deb/deb-src/ + t + d' /var/lib/chroot/${target}/etc/apt/sources.list + +# Update packages +sudo schroot -c "${target%bit}" -p -- /bin/sh -c ' + apt-get update; apt-get -y dist-upgrade' || : + +# Install a couple of missing packages +for i in debian-keyring ubuntu-keyring locales sudo; do + [ -d "/var/lib/chroot/${target}/usr/share/doc/$i" ] || + sudo schroot -c "${target%bit}" -p -- apt-get -y install "$i" || : +done + +# Configure locales +sudo schroot -c "${target%bit}" -p -- /bin/sh -c ' + l='"${LANG:-en_US}"'; l="${l%%.*}" + [ -r /etc/locale.gen ] && + sed -i "s/^# \($l\)/\1/" /etc/locale.gen + locale-gen $LANG en_US en_US.UTF-8' || : + +# Configure "sudo" package +sudo schroot -c "${target%bit}" -p -- /bin/sh -c ' + egrep '"'^$(id -nu) '"' /etc/sudoers >/dev/null 2>&1 || + echo '"'$(id -nu) ALL=(ALL) ALL'"' >>/etc/sudoers' + +# Install a few more commonly used packages +sudo schroot -c "${target%bit}" -p -- apt-get -y install \ + autoconf automake1.9 dpkg-dev g++-multilib gcc-multilib gdb less libtool \ + strace + +# If running a 32bit environment on a 64bit machine, install a few binaries +# as 64bit. +if [ "${arch}" = 32bit ] && file /bin/bash 2>/dev/null | grep -q x86-64; then + sudo schroot -c "${target%bit}" -p -- apt-get -y install \ + lib64expat1 lib64ncurses5 lib64readline6 lib64z1 + dep= + for i in binutils gdb strace; do + [ -d /usr/share/doc/"$i" ] || dep="$dep $i" + done + [ -n "$dep" ] && sudo apt-get -y install $dep + sudo cp /usr/bin/gdb /var/lib/chroot/${target}/usr/local/bin/ + sudo cp /usr/bin/ld /var/lib/chroot/${target}/usr/local/bin/ + for i in libbfd libpython; do + lib="$({ ldd /usr/bin/ld; ldd /usr/bin/gdb; } | + grep "$i" | awk '{ print $3 }')" + if [ -n "$lib" -a -r "$lib" ]; then + sudo cp "$lib" /var/lib/chroot/${target}/usr/lib64/ + fi + done + for lib in libssl libcrypt; do + sudo cp /usr/lib/$lib* /var/lib/chroot/${target}/usr/lib64/ || : + done +fi + +# Clean up package files +sudo schroot -c "${target%bit}" -p -- apt-get clean +sudo apt-get clean + +# Let the user know what we did +trap '' INT TERM QUIT +trap '' EXIT +cat <<EOF + + +Successfully installed ${distname} ${arch} + +You can run programs inside of the chroot by invoking the "${target%bit}" +command. + +Your home directory is shared between the host and the chroot. But I configured +$HOME/chroot to be private to the chroot environment. You can use it +for files that need to differ between environments. +EOF diff --git a/build/linux/SConstruct b/build/linux/SConstruct deleted file mode 100644 index 27b6984..0000000 --- a/build/linux/SConstruct +++ /dev/null @@ -1,2 +0,0 @@ -# This file is generated; do not edit. -SConscript('system_main.scons') diff --git a/build/linux/libresolv.target.mk b/build/linux/libresolv.target.mk new file mode 100644 index 0000000..7393294 --- /dev/null +++ b/build/linux/libresolv.target.mk @@ -0,0 +1,5 @@ +# This file is generated by gyp; do not edit. + +TOOLSET := target +TARGET := libresolv +### Rules for final target. diff --git a/build/linux/openssl.target.mk b/build/linux/openssl.target.mk new file mode 100644 index 0000000..22fec66 --- /dev/null +++ b/build/linux/openssl.target.mk @@ -0,0 +1,5 @@ +# This file is generated by gyp; do not edit. + +TOOLSET := target +TARGET := openssl +### Rules for final target. diff --git a/build/linux/system_main.scons b/build/linux/system_main.scons deleted file mode 100644 index fc5901f..0000000 --- a/build/linux/system_main.scons +++ /dev/null @@ -1,327 +0,0 @@ -# This file is generated; do not edit. - -__doc__ = ''' -Wrapper configuration for building this entire "solution," -including all the specific targets in various *.scons files. -''' - -import os -import sys - -import SCons.Environment -import SCons.Util - -def GetProcessorCount(): - ''' - Detects the number of CPUs on the system. Adapted form: - http://codeliberates.blogspot.com/2008/05/detecting-cpuscores-in-python.html - ''' - # Linux, Unix and Mac OS X: - if hasattr(os, 'sysconf'): - if os.sysconf_names.has_key('SC_NPROCESSORS_ONLN'): - # Linux and Unix or Mac OS X with python >= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\r', '|\r', '\\\r', '-\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = dict( - ssl = '../../net/third_party/nss/ssl.scons', - zlib = '../../third_party/zlib/zlib.scons', -) - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = ['Debug'] - -sconsbuild_dir = Dir('../../sconsbuild') - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library(target, source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule(target, source, *args, **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary(target, source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir('../..'), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%*s' % (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%-*s' % (colwidth, items[i])) - sep = '\n' + indent - result.append('\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt % columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) diff --git a/build/temp_gyp/SConstruct b/build/temp_gyp/SConstruct deleted file mode 100644 index 176b283..0000000 --- a/build/temp_gyp/SConstruct +++ /dev/null @@ -1,2 +0,0 @@ -# This file is generated; do not edit. -SConscript('googleurl_main.scons') diff --git a/build/temp_gyp/googleurl.scons b/build/temp_gyp/googleurl.scons deleted file mode 100644 index 032325b..0000000 --- a/build/temp_gyp/googleurl.scons +++ /dev/null @@ -1,343 +0,0 @@ -# This file is generated; do not edit. - -import os - -Import("env") - -env = env.Clone(COMPONENT_NAME='googleurl', - TARGET_NAME='googleurl') - -configurations = { - 'Release' : { - 'Append' : dict( - CCFLAGS = [ - '-Werror', - '-pthread', - '-fno-exceptions', - '-Wall', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-pthread', - '-D_REENTRANT', - '-I/usr/include/gtk-2.0', - '-I/usr/lib/gtk-2.0/include', - '-I/usr/include/atk-1.0', - '-I/usr/include/cairo', - '-I/usr/include/pango-1.0', - '-I/usr/include/gio-unix-2.0/', - '-I/usr/include/glib-2.0', - '-I/usr/lib/glib-2.0/include', - '-I/usr/include/pixman-1', - '-I/usr/include/freetype2', - '-I/usr/include/directfb', - '-I/usr/include/libpng12', - '-O2', - '-fno-ident', - '-fdata-sections', - '-ffunction-sections', - '-fno-asynchronous-unwind-tables' - ], - CPPDEFINES = [ - '__STDC_FORMAT_MACROS', - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'U_STATIC_IMPLEMENTATION', - 'NDEBUG', - 'NVALGRIND' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/i18n'), - env.Dir('$SRC_DIR/build/temp_gyp/../..') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-Wl,--gc-sections' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, - 'Debug' : { - 'Append' : dict( - CCFLAGS = [ - '-Werror', - '-pthread', - '-fno-exceptions', - '-Wall', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-pthread', - '-D_REENTRANT', - '-I/usr/include/gtk-2.0', - '-I/usr/lib/gtk-2.0/include', - '-I/usr/include/atk-1.0', - '-I/usr/include/cairo', - '-I/usr/include/pango-1.0', - '-I/usr/include/gio-unix-2.0/', - '-I/usr/include/glib-2.0', - '-I/usr/lib/glib-2.0/include', - '-I/usr/include/pixman-1', - '-I/usr/include/freetype2', - '-I/usr/include/directfb', - '-I/usr/include/libpng12', - '-O0', - '-g' - ], - CPPDEFINES = [ - '__STDC_FORMAT_MACROS', - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'U_STATIC_IMPLEMENTATION', - '_DEBUG' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/i18n'), - env.Dir('$SRC_DIR/build/temp_gyp/../..') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-rdynamic' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, -} - -config = configurations[env['CONFIG_NAME']] -env.Append(**config['Append']) -env.FilterOut(**config['FilterOut']) -env.Replace(**config['Replace']) - -# Scons forces -fPIC for SHCCFLAGS on some platforms. -# Disable that so we can control it from cflags in gyp. -# Note that Scons itself is inconsistent with its -fPIC -# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. -# This will make SHCCFLAGS consistent with SHCFLAGS. -env['SHCCFLAGS'] = ['$CCFLAGS'] - -for _var in config['ImportExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env[_var] = os.environ[_var] -for _var in config['PropagateExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env['ENV'][_var] = os.environ[_var] - -env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') - -if ARGUMENTS.get('COVERAGE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-fprofile-arcs', - '-ftest-coverage' - ], - LINKFLAGS = [ - '-fprofile-arcs' - ], - ) - -if ARGUMENTS.get('PROFILE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-pg', - '-g' - ], - LINKFLAGS = [ - '-pg' - ], - ) - -if ARGUMENTS.get('SYMBOLS') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-g' - ], - ) - -input_files = [ - '../../googleurl/src/gurl.cc', - '../../googleurl/src/gurl.h', - '../../googleurl/src/url_canon.h', - '../../googleurl/src/url_canon_etc.cc', - '../../googleurl/src/url_canon_fileurl.cc', - '../../googleurl/src/url_canon_host.cc', - '../../googleurl/src/url_canon_icu.cc', - '../../googleurl/src/url_canon_icu.h', - '../../googleurl/src/url_canon_internal.cc', - '../../googleurl/src/url_canon_internal.h', - '../../googleurl/src/url_canon_internal_file.h', - '../../googleurl/src/url_canon_ip.cc', - '../../googleurl/src/url_canon_ip.h', - '../../googleurl/src/url_canon_mailtourl.cc', - '../../googleurl/src/url_canon_path.cc', - '../../googleurl/src/url_canon_pathurl.cc', - '../../googleurl/src/url_canon_query.cc', - '../../googleurl/src/url_canon_relative.cc', - '../../googleurl/src/url_canon_stdstring.h', - '../../googleurl/src/url_canon_stdurl.cc', - '../../googleurl/src/url_file.h', - '../../googleurl/src/url_parse.cc', - '../../googleurl/src/url_parse.h', - '../../googleurl/src/url_parse_file.cc', - '../../googleurl/src/url_parse_internal.h', - '../../googleurl/src/url_util.cc', - '../../googleurl/src/url_util.h', -] - -target_files = [] -prerequisites = [] - -_result = [] -for infile in input_files: - if env.compilable(infile): - if (type(infile) == type('') - and (infile.startswith('$SRC_DIR/build/temp_gyp/') - or not os.path.isabs(env.subst(infile)))): - # Force files below the build directory by replacing all '..' - # elements in the path with '__': - base, ext = os.path.splitext(os.path.normpath(infile)) - base = [d == '..' and '__' or d for d in base.split('/')] - base = os.path.join(*base) - object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base - if not infile.startswith('$SRC_DIR/build/temp_gyp/'): - infile = '$SRC_DIR/build/temp_gyp/' + infile - infile = env.StaticObject(object, infile)[0] - else: - infile = env.StaticObject(infile)[0] - _result.append(infile) -input_files = _result - -_outputs = env.GypStaticLibrary(env.File('${LIB_DIR}/${LIBPREFIX}googleurl${LIBSUFFIX}'), input_files) -target_files.extend(_outputs) - -gyp_target = env.Alias('googleurl', target_files) -env.Requires(gyp_target, prerequisites) -Return("gyp_target") diff --git a/build/temp_gyp/googleurl_main.scons b/build/temp_gyp/googleurl_main.scons deleted file mode 100644 index 77b799a..0000000 --- a/build/temp_gyp/googleurl_main.scons +++ /dev/null @@ -1,339 +0,0 @@ -# This file is generated; do not edit. - -__doc__ = ''' -Wrapper configuration for building this entire "solution," -including all the specific targets in various *.scons files. -''' - -import os -import sys - -import SCons.Environment -import SCons.Util - -def GetProcessorCount(): - ''' - Detects the number of CPUs on the system. Adapted form: - http://codeliberates.blogspot.com/2008/05/detecting-cpuscores-in-python.html - ''' - # Linux, Unix and Mac OS X: - if hasattr(os, 'sysconf'): - if os.sysconf_names.has_key('SC_NPROCESSORS_ONLN'): - # Linux and Unix or Mac OS X with python >= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\r', '|\r', '\\\r', '-\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = dict( - base = '../../base/base.scons', - googleurl = 'googleurl.scons', - googleurl_unittests = 'googleurl_unittests.scons', - gtest = '../../testing/gtest.scons', - icudata = '../../third_party/icu/icudata.scons', - icui18n = '../../third_party/icu/icui18n.scons', - icuuc = '../../third_party/icu/icuuc.scons', - lastchange = '../util/lastchange.scons', - libevent = '../../third_party/libevent/libevent.scons', - modp_b64 = '../../third_party/modp_b64/modp_b64.scons', - ssl = '../../net/third_party/nss/ssl.scons', - symbolize = '../../base/symbolize.scons', - xdg_mime = '../../base/xdg_mime.scons', - zlib = '../../third_party/zlib/zlib.scons', -) - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = ['Debug'] - -sconsbuild_dir = Dir('../../sconsbuild') - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library(target, source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule(target, source, *args, **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary(target, source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir('../..'), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%*s' % (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%-*s' % (colwidth, items[i])) - sep = '\n' + indent - result.append('\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt % columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) diff --git a/build/temp_gyp/googleurl_unittests.scons b/build/temp_gyp/googleurl_unittests.scons deleted file mode 100644 index 808b660..0000000 --- a/build/temp_gyp/googleurl_unittests.scons +++ /dev/null @@ -1,421 +0,0 @@ -# This file is generated; do not edit. - -import os - -Import("env") - -env = env.Clone(COMPONENT_NAME='googleurl', - TARGET_NAME='googleurl_unittests') - -configurations = { - 'Release' : { - 'Append' : dict( - CCFLAGS = [ - '-Werror', - '-pthread', - '-fno-exceptions', - '-Wall', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-O2', - '-fno-ident', - '-fdata-sections', - '-ffunction-sections', - '-fno-asynchronous-unwind-tables' - ], - CPPDEFINES = [ - '__STDC_FORMAT_MACROS', - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'UNIT_TEST', - 'GTEST_HAS_RTTI=0', - 'U_STATIC_IMPLEMENTATION', - 'NDEBUG', - 'NVALGRIND' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/temp_gyp/../..'), - env.Dir('$SRC_DIR/build/temp_gyp/../../testing/gtest/include') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-Wl,--gc-sections' - ], - LIBS = [ - '-lrt', - '-lgtk-x11-2.0', - '-lgdk-x11-2.0', - '-latk-1.0', - '-lgio-2.0', - '-lpangoft2-1.0', - '-lgdk_pixbuf-2.0', - '-lm', - '-lpangocairo-1.0', - '-lcairo', - '-lpango-1.0', - '-lfreetype', - '-lfontconfig', - '-lgobject-2.0', - '-lgmodule-2.0', - '-lgthread-2.0', - '-lrt', - '-lglib-2.0', - '-lnss3', - '-lnssutil3', - '-lsmime3', - '-lplds4', - '-lplc4', - '-lnspr4', - '-lpthread', - '-ldl', - '-lz', - '-lrt', - 'libgoogleurl', - 'libgtest', - 'libicuuc', - 'libbase', - 'libmodp_b64', - 'libssl', - 'libzlib', - 'libsymbolize', - 'libxdg_mime', - 'libevent', - 'libicudata', - 'libicui18n' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, - 'Debug' : { - 'Append' : dict( - CCFLAGS = [ - '-Werror', - '-pthread', - '-fno-exceptions', - '-Wall', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-O0', - '-g' - ], - CPPDEFINES = [ - '__STDC_FORMAT_MACROS', - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'UNIT_TEST', - 'GTEST_HAS_RTTI=0', - 'U_STATIC_IMPLEMENTATION', - '_DEBUG' - ], - CPPPATH = [ - env.Dir('$SRC_DIR/build/temp_gyp/../../third_party/icu/public/common'), - env.Dir('$SRC_DIR/build/temp_gyp/../..'), - env.Dir('$SRC_DIR/build/temp_gyp/../../testing/gtest/include') - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-rdynamic' - ], - LIBS = [ - '-lrt', - '-lgtk-x11-2.0', - '-lgdk-x11-2.0', - '-latk-1.0', - '-lgio-2.0', - '-lpangoft2-1.0', - '-lgdk_pixbuf-2.0', - '-lm', - '-lpangocairo-1.0', - '-lcairo', - '-lpango-1.0', - '-lfreetype', - '-lfontconfig', - '-lgobject-2.0', - '-lgmodule-2.0', - '-lgthread-2.0', - '-lrt', - '-lglib-2.0', - '-lnss3', - '-lnssutil3', - '-lsmime3', - '-lplds4', - '-lplc4', - '-lnspr4', - '-lpthread', - '-ldl', - '-lz', - '-lrt', - 'libgoogleurl', - 'libgtest', - 'libicuuc', - 'libbase', - 'libmodp_b64', - 'libssl', - 'libzlib', - 'libsymbolize', - 'libxdg_mime', - 'libevent', - 'libicudata', - 'libicui18n' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, -} - -config = configurations[env['CONFIG_NAME']] -env.Append(**config['Append']) -env.FilterOut(**config['FilterOut']) -env.Replace(**config['Replace']) - -# Scons forces -fPIC for SHCCFLAGS on some platforms. -# Disable that so we can control it from cflags in gyp. -# Note that Scons itself is inconsistent with its -fPIC -# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. -# This will make SHCCFLAGS consistent with SHCFLAGS. -env['SHCCFLAGS'] = ['$CCFLAGS'] - -for _var in config['ImportExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env[_var] = os.environ[_var] -for _var in config['PropagateExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env['ENV'][_var] = os.environ[_var] - -env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') - -if ARGUMENTS.get('COVERAGE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-fprofile-arcs', - '-ftest-coverage' - ], - LINKFLAGS = [ - '-fprofile-arcs' - ], - ) - -if ARGUMENTS.get('PROFILE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-pg', - '-g' - ], - LINKFLAGS = [ - '-pg' - ], - ) - -if ARGUMENTS.get('SYMBOLS') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-g' - ], - ) - -input_files = [ - '../../googleurl/src/gurl_unittest.cc', - '../../googleurl/src/url_canon_unittest.cc', - '../../googleurl/src/url_parse_unittest.cc', - '../../googleurl/src/url_test_utils.h', - '../../googleurl/src/url_util_unittest.cc', - '../../googleurl/src/gurl_test_main.cc', -] - -target_files = [] -prerequisites = [] - -_result = [] -for infile in input_files: - if env.compilable(infile): - if (type(infile) == type('') - and (infile.startswith('$SRC_DIR/build/temp_gyp/') - or not os.path.isabs(env.subst(infile)))): - # Force files below the build directory by replacing all '..' - # elements in the path with '__': - base, ext = os.path.splitext(os.path.normpath(infile)) - base = [d == '..' and '__' or d for d in base.split('/')] - base = os.path.join(*base) - object = '${OBJ_DIR}/${COMPONENT_NAME}/${TARGET_NAME}/' + base - if not infile.startswith('$SRC_DIR/build/temp_gyp/'): - infile = '$SRC_DIR/build/temp_gyp/' + infile - infile = env.StaticObject(object, infile)[0] - else: - infile = env.StaticObject(infile)[0] - _result.append(infile) -input_files = _result - -_outputs = env.GypProgram(env.File('${TOP_BUILDDIR}/${PROGPREFIX}googleurl_unittests${PROGSUFFIX}'), input_files) -target_files.extend(_outputs) - -if GetOption('verbose'): - _action = Action([['cd', - '"/usr/local/google/src/chromium-merge/src/build/temp_gyp"', - '&&', - '$TARGET_NAME', - '--gtest_print_time']]) -else: - _action = Action([['cd', - '"/usr/local/google/src/chromium-merge/src/build/temp_gyp"', - '&&', - '$TARGET_NAME', - '--gtest_print_time']], ) - -gyp_target = env.Alias('googleurl_unittests', target_files) -dependencies = [ - Alias('googleurl'), - Alias('gtest'), - Alias('icuuc'), - Alias('base'), - Alias('modp_b64'), - Alias('gtk'), - Alias('nss'), - Alias('ssl'), - Alias('zlib'), - Alias('symbolize'), - Alias('xdg_mime'), - Alias('libevent'), - Alias('icudata'), - Alias('icui18n') -] -env.Requires(target_files, dependencies) -env.Requires(gyp_target, dependencies) -for prerequisite in prerequisites: - env.Requires(prerequisite, dependencies) -env.Requires(gyp_target, prerequisites) - -_run_as_target = env.Alias('run_googleurl_unittests', target_files, _action) -env.Requires(_run_as_target, [ - Alias('googleurl_unittests'), -]) -env.AlwaysBuild(_run_as_target) -Return("gyp_target") diff --git a/build/util/SConstruct b/build/util/SConstruct deleted file mode 100644 index bd7020c..0000000 --- a/build/util/SConstruct +++ /dev/null @@ -1,2 +0,0 @@ -# This file is generated; do not edit. -SConscript('build_util_main.scons') diff --git a/build/util/build_util_main.scons b/build/util/build_util_main.scons deleted file mode 100644 index 41dc2c4..0000000 --- a/build/util/build_util_main.scons +++ /dev/null @@ -1,326 +0,0 @@ -# This file is generated; do not edit. - -__doc__ = ''' -Wrapper configuration for building this entire "solution," -including all the specific targets in various *.scons files. -''' - -import os -import sys - -import SCons.Environment -import SCons.Util - -def GetProcessorCount(): - ''' - Detects the number of CPUs on the system. Adapted form: - http://codeliberates.blogspot.com/2008/05/detecting-cpuscores-in-python.html - ''' - # Linux, Unix and Mac OS X: - if hasattr(os, 'sysconf'): - if os.sysconf_names.has_key('SC_NPROCESSORS_ONLN'): - # Linux and Unix or Mac OS X with python >= 2.5: - return os.sysconf('SC_NPROCESSORS_ONLN') - else: # Mac OS X with Python < 2.5: - return int(os.popen2("sysctl -n hw.ncpu")[1].read()) - # Windows: - if os.environ.has_key('NUMBER_OF_PROCESSORS'): - return max(int(os.environ.get('NUMBER_OF_PROCESSORS', '1')), 1) - return 1 # Default - -# Support PROGRESS= to show progress in different ways. -p = ARGUMENTS.get('PROGRESS') -if p == 'spinner': - Progress(['/\r', '|\r', '\\\r', '-\r'], - interval=5, - file=open('/dev/tty', 'w')) -elif p == 'name': - Progress('$TARGET\r', overwrite=True, file=open('/dev/tty', 'w')) - -# Set the default -j value based on the number of processors. -SetOption('num_jobs', GetProcessorCount() + 1) - -# Have SCons use its cached dependency information. -SetOption('implicit_cache', 1) - -# Only re-calculate MD5 checksums if a timestamp has changed. -Decider('MD5-timestamp') - -# Since we set the -j value by default, suppress SCons warnings about being -# unable to support parallel build on versions of Python with no threading. -default_warnings = ['no-no-parallel-support'] -SetOption('warn', default_warnings + GetOption('warn')) - -AddOption('--mode', nargs=1, dest='conf_list', default=[], - action='append', help='Configuration to build.') - -AddOption('--verbose', dest='verbose', default=False, - action='store_true', help='Verbose command-line output.') - - -# -sconscript_file_map = dict( - lastchange = 'lastchange.scons', -) - -class LoadTarget: - ''' - Class for deciding if a given target sconscript is to be included - based on a list of included target names, optionally prefixed with '-' - to exclude a target name. - ''' - def __init__(self, load): - ''' - Initialize a class with a list of names for possible loading. - - Arguments: - load: list of elements in the LOAD= specification - ''' - self.included = set([c for c in load if not c.startswith('-')]) - self.excluded = set([c[1:] for c in load if c.startswith('-')]) - - if not self.included: - self.included = set(['all']) - - def __call__(self, target): - ''' - Returns True if the specified target's sconscript file should be - loaded, based on the initialized included and excluded lists. - ''' - return (target in self.included or - ('all' in self.included and not target in self.excluded)) - -if 'LOAD' in ARGUMENTS: - load = ARGUMENTS['LOAD'].split(',') -else: - load = [] -load_target = LoadTarget(load) - -sconscript_files = [] -for target, sconscript in sconscript_file_map.iteritems(): - if load_target(target): - sconscript_files.append(sconscript) - - -target_alias_list= [] - -conf_list = GetOption('conf_list') -if conf_list: - # In case the same --mode= value was specified multiple times. - conf_list = list(set(conf_list)) -else: - conf_list = ['Debug'] - -sconsbuild_dir = Dir('../../sconsbuild') - - -def FilterOut(self, **kw): - kw = SCons.Environment.copy_non_reserved_keywords(kw) - for key, val in kw.items(): - envval = self.get(key, None) - if envval is None: - # No existing variable in the environment, so nothing to delete. - continue - - for vremove in val: - # Use while not if, so we can handle duplicates. - while vremove in envval: - envval.remove(vremove) - - self[key] = envval - - # TODO(sgk): SCons.Environment.Append() has much more logic to deal - # with various types of values. We should handle all those cases in here - # too. (If variable is a dict, etc.) - - -non_compilable_suffixes = { - 'LINUX' : set([ - '.bdic', - '.css', - '.dat', - '.fragment', - '.gperf', - '.h', - '.hh', - '.hpp', - '.html', - '.hxx', - '.idl', - '.in', - '.in0', - '.in1', - '.js', - '.mk', - '.rc', - '.sigs', - '', - ]), - 'WINDOWS' : set([ - '.h', - '.hh', - '.hpp', - '.dat', - '.idl', - '.in', - '.in0', - '.in1', - ]), -} - -def compilable(env, file): - base, ext = os.path.splitext(str(file)) - if ext in non_compilable_suffixes[env['TARGET_PLATFORM']]: - return False - return True - -def compilable_files(env, sources): - return [x for x in sources if compilable(env, x)] - -def GypProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def GypTestProgram(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Program(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(*result) - return result - -def GypLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.Library(target, source, *args, **kw) - return result - -def GypLoadableModule(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.LoadableModule(target, source, *args, **kw) - return result - -def GypStaticLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.StaticLibrary(target, source, *args, **kw) - return result - -def GypSharedLibrary(env, target, source, *args, **kw): - source = compilable_files(env, source) - result = env.SharedLibrary(target, source, *args, **kw) - if env.get('INCREMENTAL'): - env.Precious(result) - return result - -def add_gyp_methods(env): - env.AddMethod(GypProgram) - env.AddMethod(GypTestProgram) - env.AddMethod(GypLibrary) - env.AddMethod(GypLoadableModule) - env.AddMethod(GypStaticLibrary) - env.AddMethod(GypSharedLibrary) - - env.AddMethod(FilterOut) - - env.AddMethod(compilable) - - -base_env = Environment( - tools = ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'], - INTERMEDIATE_DIR='$OBJ_DIR/${COMPONENT_NAME}/_${TARGET_NAME}_intermediate', - LIB_DIR='$TOP_BUILDDIR/lib', - OBJ_DIR='$TOP_BUILDDIR/obj', - SCONSBUILD_DIR=sconsbuild_dir.abspath, - SHARED_INTERMEDIATE_DIR='$OBJ_DIR/_global_intermediate', - SRC_DIR=Dir('../..'), - TARGET_PLATFORM='LINUX', - TOP_BUILDDIR='$SCONSBUILD_DIR/$CONFIG_NAME', - LIBPATH=['$LIB_DIR'], -) - -if not GetOption('verbose'): - base_env.SetDefault( - ARCOMSTR='Creating library $TARGET', - ASCOMSTR='Assembling $TARGET', - CCCOMSTR='Compiling $TARGET', - CONCATSOURCECOMSTR='ConcatSource $TARGET', - CXXCOMSTR='Compiling $TARGET', - LDMODULECOMSTR='Building loadable module $TARGET', - LINKCOMSTR='Linking $TARGET', - MANIFESTCOMSTR='Updating manifest for $TARGET', - MIDLCOMSTR='Compiling IDL $TARGET', - PCHCOMSTR='Precompiling $TARGET', - RANLIBCOMSTR='Indexing $TARGET', - RCCOMSTR='Compiling resource $TARGET', - SHCCCOMSTR='Compiling $TARGET', - SHCXXCOMSTR='Compiling $TARGET', - SHLINKCOMSTR='Linking $TARGET', - SHMANIFESTCOMSTR='Updating manifest for $TARGET', - ) - -add_gyp_methods(base_env) - -for conf in conf_list: - env = base_env.Clone(CONFIG_NAME=conf) - SConsignFile(env.File('$TOP_BUILDDIR/.sconsign').abspath) - for sconscript in sconscript_files: - target_alias = env.SConscript(sconscript, exports=['env']) - if target_alias: - target_alias_list.extend(target_alias) - -Default(Alias('all', target_alias_list)) - -help_fmt = ''' -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Local command-line build options: - --mode=CONFIG Configuration to build: - --mode=Debug [default] - --mode=Release - --verbose Print actual executed command lines. - -Supported command-line build variables: - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes) - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - -The following TARGET names can also be used as LOAD= module names: - -%s -''' - -if GetOption('help'): - def columnar_text(items, width=78, indent=2, sep=2): - result = [] - colwidth = max(map(len, items)) + sep - cols = (width - indent) / colwidth - if cols < 1: - cols = 1 - rows = (len(items) + cols - 1) / cols - indent = '%*s' % (indent, '') - sep = indent - for row in xrange(0, rows): - result.append(sep) - for i in xrange(row, len(items), rows): - result.append('%-*s' % (colwidth, items[i])) - sep = '\n' + indent - result.append('\n') - return ''.join(result) - - load_list = set(sconscript_file_map.keys()) - target_aliases = set(map(str, target_alias_list)) - - common = load_list and target_aliases - load_only = load_list - common - target_only = target_aliases - common - help_text = [help_fmt % columnar_text(sorted(list(common)))] - if target_only: - fmt = "The following are additional TARGET names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(target_only)))) - if load_only: - fmt = "The following are additional LOAD= module names:\n\n%s\n" - help_text.append(fmt % columnar_text(sorted(list(load_only)))) - Help(''.join(help_text)) diff --git a/build/util/lastchange.scons b/build/util/lastchange.scons deleted file mode 100644 index 9c26cce..0000000 --- a/build/util/lastchange.scons +++ /dev/null @@ -1,278 +0,0 @@ -# This file is generated; do not edit. - -import os - -Import("env") - -env = env.Clone(COMPONENT_NAME='build_util', - TARGET_NAME='lastchange') - -configurations = { - 'Release' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-O2', - '-fno-ident', - '-fdata-sections', - '-ffunction-sections', - '-fno-asynchronous-unwind-tables' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - 'NDEBUG', - 'NVALGRIND' - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-Wl,--gc-sections' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, - 'Debug' : { - 'Append' : dict( - CCFLAGS = [ - '-pthread', - '-fno-exceptions', - '-D_FILE_OFFSET_BITS=64', - '-fvisibility=hidden', - '-fno-strict-aliasing', - '-O0', - '-g' - ], - CPPDEFINES = [ - 'CHROMIUM_BUILD', - 'ENABLE_GPU=1', - '_DEBUG' - ], - CXXFLAGS = [ - '-fno-rtti', - '-fno-threadsafe-statics', - '-fvisibility-inlines-hidden' - ], - LINKFLAGS = [ - '-pthread', - '-rdynamic' - ], - ), - 'FilterOut' : dict( - ), - 'Replace' : dict( - FLOCK_LDMODULE = ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'], - FLOCK_LINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'], - FLOCK_SHLINK = ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'], - IMPLICIT_COMMAND_DEPENDENCIES = '0', - LDMODULECOM = [['$FLOCK_LDMODULE', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LDMODULEFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - LIBPATH = ['$LIB_DIR'], - LINKCOM = [['$FLOCK_LINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$LINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - SHLINKCOM = [['$FLOCK_SHLINK', - '-o', - '$TARGET', - '$_LIBDIRFLAGS', - '$SHLINKFLAGS', - '$SOURCES', - '-Wl,--start-group', - '$_LIBFLAGS', - '-Wl,--end-group']], - ), - 'ImportExternal' : [ - 'AS', - 'CC', - 'CXX', - 'LINK', - ], - 'PropagateExternal' : [ - 'AS', - 'CC', - 'CCACHE_DIR', - 'CXX', - 'DISTCC_DIR', - 'DISTCC_HOSTS', - 'HOME', - 'INCLUDE_SERVER_ARGS', - 'INCLUDE_SERVER_PORT', - 'LINK', - 'CHROME_BUILD_TYPE', - 'CHROMIUM_BUILD', - 'OFFICIAL_BUILD', - ], - }, -} - -config = configurations[env['CONFIG_NAME']] -env.Append(**config['Append']) -env.FilterOut(**config['FilterOut']) -env.Replace(**config['Replace']) - -# Scons forces -fPIC for SHCCFLAGS on some platforms. -# Disable that so we can control it from cflags in gyp. -# Note that Scons itself is inconsistent with its -fPIC -# setting. SHCCFLAGS forces -fPIC, and SHCFLAGS does not. -# This will make SHCCFLAGS consistent with SHCFLAGS. -env['SHCCFLAGS'] = ['$CCFLAGS'] - -for _var in config['ImportExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env[_var] = os.environ[_var] -for _var in config['PropagateExternal']: - if _var in ARGUMENTS: - env[_var] = ARGUMENTS[_var] - elif _var in os.environ: - env['ENV'][_var] = os.environ[_var] - -env['ENV']['LD_LIBRARY_PATH'] = env.subst('$LIB_DIR') - -if ARGUMENTS.get('COVERAGE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-fprofile-arcs', - '-ftest-coverage' - ], - LINKFLAGS = [ - '-fprofile-arcs' - ], - ) - -if ARGUMENTS.get('PROFILE') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-pg', - '-g' - ], - LINKFLAGS = [ - '-pg' - ], - ) - -if ARGUMENTS.get('SYMBOLS') not in (None, '0'): - env.AppendUnique( - CCFLAGS = [ - '-g' - ], - ) - -input_files = [] - -target_files = [] -prerequisites = [] - -if GetOption('verbose'): - _action = Action([['cd', - '$SRC_DIR/build/util', - '&&', - 'python', - './lastchange.py', - '-o', - '${SHARED_INTERMEDIATE_DIR}/build/LASTCHANGE', - '-d', - '../LASTCHANGE.in']]) -else: - _action = Action([['cd', - '$SRC_DIR/build/util', - '&&', - 'python', - './lastchange.py', - '-o', - '${SHARED_INTERMEDIATE_DIR}/build/LASTCHANGE', - '-d', - '../LASTCHANGE.in']], 'Extracting last change to ${SHARED_INTERMEDIATE_DIR}/build/LASTCHANGE') -_outputs = env.Command( - ['${SHARED_INTERMEDIATE_DIR}/build/LASTCHANGE', - '${SHARED_INTERMEDIATE_DIR}/build/LASTCHANGE.always'], - ['$SRC_DIR/build/util/./lastchange.py'], - _action -) -input_files.extend(_outputs) -prerequisites.extend(_outputs) -target_files.extend(_outputs) - -target_files.extend(input_files) - -gyp_target = env.Alias('lastchange', target_files) -env.Requires(gyp_target, prerequisites) -Return("gyp_target") |