diff options
-rw-r--r-- | base/SConscript | 11 | ||||
-rw-r--r-- | base/gfx/SConscript | 13 | ||||
-rw-r--r-- | build/SConscript.googleurl | 64 | ||||
-rw-r--r-- | build/SConscript.main | 752 | ||||
-rw-r--r-- | build/SConscript.v8 | 25 | ||||
-rw-r--r-- | chrome/SConstruct | 1 | ||||
-rw-r--r-- | net/SConscript | 29 | ||||
-rw-r--r-- | net/tools/tld_cleanup/SConscript | 3 | ||||
-rw-r--r-- | sandbox/src/SConscript | 17 | ||||
-rw-r--r-- | third_party/bsdiff/SConscript | 2 | ||||
-rw-r--r-- | webkit/SConscript | 16 | ||||
-rw-r--r-- | webkit/activex_shim/SConscript | 3 | ||||
-rw-r--r-- | webkit/activex_shim_dll/SConscript | 3 | ||||
-rw-r--r-- | webkit/build/port/SConscript | 3 | ||||
-rw-r--r-- | webkit/default_plugin/SConscript | 3 | ||||
-rw-r--r-- | webkit/glue/plugins/test/SConscript | 15 | ||||
-rw-r--r-- | webkit/tools/npapi_layout_test_plugin/SConscript | 20 | ||||
-rw-r--r-- | webkit/tools/test_shell/SConscript | 63 |
18 files changed, 509 insertions, 534 deletions
diff --git a/base/SConscript b/base/SConscript index 2d7e8a7..ef462d9 100644 --- a/base/SConscript +++ b/base/SConscript @@ -11,7 +11,7 @@ env.Prepend( CPPPATH = [ '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', - '..', + '$ROOT_DIR', ], CPPDEFINES = [ 'U_STATIC_IMPLEMENTATION', @@ -191,7 +191,7 @@ env_tests.Prepend( '$LIBPNG_DIR', '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', - '..', + '$ROOT_DIR', ], CPPDEFINES = [ 'UNIT_TEST', @@ -304,7 +304,7 @@ test_files = [ if env['PLATFORM'] == 'win32': # These tests aren't really Windows-specific, they're just here until # we have the port versions working. - env_tests.ChromeTestProgram('debug_message', ['debug_message.cc']) + env_tests.ChromeProgram('debug_message', ['debug_message.cc']) test_files.extend([ 'directory_watcher_unittest.cc', @@ -336,8 +336,9 @@ if env['PLATFORM'] == 'darwin': base_unittests = env_tests.ChromeTestProgram('base_unittests', test_files) -# Install up a level to allow unit test path assumptions to be valid. -installed_base_unittests = env.Install('$TARGET_ROOT', base_unittests) +# Temporarily put things where the buildbot expects them. +installed_base_unittests = env.Replicate('$MAIN_DIR/Hammer', base_unittests) +env.Requires(installed_base_unittests, '$MAIN_DIR/Hammer/icudt38.dll') sconscript_dirs = [ diff --git a/base/gfx/SConscript b/base/gfx/SConscript index c862193..57d1b54 100644 --- a/base/gfx/SConscript +++ b/base/gfx/SConscript @@ -6,10 +6,12 @@ Import('env') env = env.Clone() -# Remove an inherited relative path that doesn't make sense anymore. This -# makes sure we don't pull in the wrong version of time.h when building on -# linux. -env['CPPPATH'].remove('..') +# This path causing linux to grab the wrong time.h +env.FilterOut( + CPPPATH = [ + '$MAIN_DIR/..', + ], +) env.Prepend( CPPPATH = [ @@ -20,7 +22,6 @@ env.Prepend( '$LIBPNG_DIR', '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', - '../..', ], CPPDEFINES = [ 'PNG_USER_CONFIG', @@ -62,6 +63,7 @@ if env['PLATFORM'] == 'win32': if env['PLATFORM'] == 'win32': input_files.extend([ + 'gdi_util.cc', 'bitmap_platform_device_win.cc', 'platform_canvas_win.cc', 'platform_device_win.cc', @@ -74,4 +76,3 @@ elif env['PLATFORM'] == 'posix': ]) env.ChromeStaticLibrary('base_gfx', input_files) - diff --git a/build/SConscript.googleurl b/build/SConscript.googleurl index 11ca7c7..4407afc 100644 --- a/build/SConscript.googleurl +++ b/build/SConscript.googleurl @@ -28,34 +28,25 @@ if env['PLATFORM'] == 'win32': ) lib_input_files = [ - 'gurl.cc', - 'url_canon_etc.cc', - 'url_canon_fileurl.cc', - 'url_canon_host.cc', - 'url_canon_icu.cc', - 'url_canon_internal.cc', - 'url_canon_ip.cc', - 'url_canon_mailtourl.cc', - 'url_canon_path.cc', - 'url_canon_pathurl.cc', - 'url_canon_query.cc', - 'url_canon_relative.cc', - 'url_canon_stdurl.cc', - 'url_parse.cc', - 'url_parse_file.cc', - 'url_util.cc', + 'src/gurl.cc', + 'src/url_canon_etc.cc', + 'src/url_canon_fileurl.cc', + 'src/url_canon_host.cc', + 'src/url_canon_icu.cc', + 'src/url_canon_internal.cc', + 'src/url_canon_ip.cc', + 'src/url_canon_mailtourl.cc', + 'src/url_canon_path.cc', + 'src/url_canon_pathurl.cc', + 'src/url_canon_query.cc', + 'src/url_canon_relative.cc', + 'src/url_canon_stdurl.cc', + 'src/url_parse.cc', + 'src/url_parse_file.cc', + 'src/url_util.cc', ] -def BuildObjectFiles(environ, input_files): - obj_files = [] - for input_file in input_files: - source = '../googleurl/src/' + input_file - target = '$TARGET_ROOT/googleurl/' + input_file[:input_file.find('.cc')] - obj_files.append(environ.StaticObject(source = source, target = target)) - return obj_files - -env.ChromeStaticLibrary('$TARGET_ROOT/googleurl/googleurl', - BuildObjectFiles(env, lib_input_files)) +env.ChromeStaticLibrary('googleurl', lib_input_files) env_tests = env.Clone() @@ -75,21 +66,20 @@ env_tests.Append( ) test_files = [ - 'gurl_unittest.cc', - 'url_canon_unittest.cc', - 'url_parse_unittest.cc', - 'url_util_unittest.cc', + 'src/gurl_unittest.cc', + 'src/url_canon_unittest.cc', + 'src/url_parse_unittest.cc', + 'src/url_util_unittest.cc', + # The version of gtest that googleurl uses provides a main() function; ours + # doesn't so include our own main function. + env_tests.ChromeObject('run_all_unittests', + '$OBJ_ROOT/base/run_all_unittests.cc'), ] -test_obj_files = BuildObjectFiles(env_tests, test_files) # The version of gtest that googleurl uses provides a main() function; ours # doesn't so include our own main function. -test_obj_files.append(env_tests.StaticObject(source = '../base/run_all_unittests.cc', - target = '$TARGET_ROOT/googleurl/run_all_unittests')) - -gurl_unittests = env_tests.ChromeTestProgram( - '$TARGET_ROOT/googleurl/googleurl_unittests', test_obj_files) +gurl_unittests = env_tests.ChromeTestProgram('googleurl_unittests', test_files) -installed_gurl_unittests = env.Install('$TARGET_ROOT', gurl_unittests) +installed_gurl_unittests = env.Replicate('$MAIN_DIR/Hammer', gurl_unittests) env.Alias('googleurl', installed_gurl_unittests) diff --git a/build/SConscript.main b/build/SConscript.main index 275df6d3..43477b2 100644 --- a/build/SConscript.main +++ b/build/SConscript.main @@ -7,6 +7,27 @@ import shutil import sys + +# Overlay things from a layer below. +Dir('base').addRepository(Dir('../base')) +Dir('breakpad').addRepository(Dir('../breakpad')) +Dir('gears').addRepository(Dir('../gears')) +Dir('net').addRepository(Dir('../net')) +Dir('rlz').addRepository(Dir('../rlz')) +Dir('sandbox').addRepository(Dir('../sandbox')) +Dir('skia').addRepository(Dir('../skia')) +Dir('sdch').addRepository(Dir('../sdch')) +Dir('testing').addRepository(Dir('../testing')) +Dir('third_party').addRepository(Dir('../third_party')) +Dir('webkit').addRepository(Dir('../webkit')) + +# This one is somewhat special. +Dir('../build').addRepository(Dir('../googleurl')) + + +#----------------------------------------------------------------------- + + p = ARGUMENTS.get('PROGRESS') if p == 'spinner': Progress(['/\r', '|\r', '\\\r', '-\r'], interval=5, file=open('con', 'w')) @@ -25,18 +46,17 @@ else: load = [] -env = Environment( - BUILD_TYPE = ARGUMENTS.get('BUILD_TYPE', 'Hammer'), - TARGET_ROOT = '#/$BUILD_TYPE', - OBJ_ROOT = '$TARGET_ROOT', - - LIBS_DIR = '#/$BUILD_TYPE/Libs', +base_env = Environment(tools = ['component_setup']) +base_env.Replace( + # $MAIN_DIR refers to the directory in which the SConstruct lives. + # $ROOT_DIR is src/ + ROOT_DIR = '$MAIN_DIR/..', - BASE_DIR = '#/$BUILD_TYPE/base', - BREAKPAD_DIR = '#/$BUILD_TYPE/breakpad', - CHROME_DIR = '#/$BUILD_TYPE/chrome', - GEARS_DIR = '#/$BUILD_TYPE/gears', - GOOGLE_UPDATE_DIR = '#/$BUILD_TYPE/google_update', + BASE_DIR = '$ROOT_DIR/base', + BREAKPAD_DIR = '$ROOT_DIR/breakpad', + CHROME_DIR = '$ROOT_DIR/chrome', + GEARS_DIR = '$ROOT_DIR/gears', + GOOGLE_UPDATE_DIR = '$ROOT_DIR/google_update', # Work around a limitation (bug?) in SCons in that, when we build # from a different directory, it forces the build targets defined @@ -45,18 +65,18 @@ env = Environment( # the SConstruct directory from which SCons was launched. When # we roll forward to a version of SCons that fixes this, we'll # need to revert to the $BUILD_TYPE definition of GOOGLEURL_DIR. - #GOOGLEURL_DIR = '#/$BUILD_TYPE/googleurl', - GOOGLEURL_DIR = '#/../build/googleurl', - - NET_DIR = '#/$BUILD_TYPE/net', - RLZ_DIR = '#/$BUILD_TYPE/rlz', - SANDBOX_DIR = '#/$BUILD_TYPE/sandbox', - SDCH_DIR = '#/$BUILD_TYPE/sdch', - SKIA_DIR = '#/$BUILD_TYPE/skia', - TESTING_DIR = '#/$BUILD_TYPE/testing', - THIRD_PARTY_DIR = '#/$BUILD_TYPE/third_party', - V8_DIR = '#/$BUILD_TYPE/v8', - WEBKIT_DIR = '#/$BUILD_TYPE/webkit', + + GOOGLEURL_DIR = '$ROOT_DIR/build/googleurl', + + NET_DIR = '$ROOT_DIR/net', + RLZ_DIR = '$ROOT_DIR/rlz', + SANDBOX_DIR = '$ROOT_DIR/sandbox', + SDCH_DIR = '$ROOT_DIR/sdch', + SKIA_DIR = '$ROOT_DIR/skia', + TESTING_DIR = '$ROOT_DIR/testing', + THIRD_PARTY_DIR = '$OBJ_ROOT/third_party', + V8_DIR = '$ROOT_DIR/v8', + WEBKIT_DIR = '$OBJ_ROOT/webkit', GTEST_DIR = '$TESTING_DIR/gtest', @@ -71,14 +91,51 @@ env = Environment( LIBXSLT_DIR = '$THIRD_PARTY_DIR/libxslt', LZMA_SDK_DIR = '$THIRD_PARTY_DIR/lzma_sdk', MODP_B64_DIR = '$THIRD_PARTY_DIR/modp_b64', - NPAPI_DIR = '$THIRD_PARTY_DIR/npapi', + NPAPI_DIR = '$ROOT_DIR/third_party/npapi', ZLIB_DIR = '$THIRD_PARTY_DIR/zlib', - THIRD_PARTY_WEBKIT_DIR = '$THIRD_PARTY_DIR/WebKit', + THIRD_PARTY_WEBKIT_DIR = '$ROOT_DIR/third_party/WebKit', PYTHON=sys.executable, - LIBPATH = ['$LIBS_DIR'], + # This is temporarily in flux. + # Currently these are all relative to src/build, with the additional, + # wrinkle that several addRepository lines at the top of this file cause + # everything in src to be conceptually underlayed in src/build. + # Thus things like src/SConscript.googleurl are listed directly, + # but things like base/SConscript are down a layer. + # Some of this will hopefully get cleaner if we move the SConstruct up a + # layer. + BUILD_SCONSCRIPTS = [ + 'base/SConscript', + 'breakpad/SConscript', + #'chrome/SConscript', + #'gears/SConscript', + #'google_update_dir/SConscript', + 'SConscript.googleurl', + 'net/SConscript', + 'rlz/SConscript', + 'sandbox/src/SConscript', + 'sdch/SConscript', + 'skia/SConscript', + + 'testing/SConscript.gtest', + + 'third_party/bsdiff/SConscript', + 'third_party/bzip2/SConscript', + 'third_party/icu38/SConscript', + 'third_party/libpng/SConscript', + 'third_party/lzma_sdk/SConscript', + 'third_party/modp_b64/SConscript', + 'third_party/zlib/SConscript', + + 'third_party/libjpeg/SConscript', + 'third_party/libxml/SConscript', + 'third_party/libxslt/SConscript', + + 'SConscript.v8', + 'webkit/SConscript', + ], PERL = 'perl', PERL_INCLUDE_FLAG = '-I ', @@ -89,87 +146,62 @@ env = Environment( '__env__, RDirs, TARGET, SOURCE)}'), ) -def AddPdbToTarget(args): - """Add the windows pdb file to the build target. - - Arguments: - args is a tuple passed to ChromeProgram or ChromeTestProgram - Returns: - A tuple to pass on to Environment.Program.""" - # Only add .pdb to the target if the target was only a string. We can't - # blindly add foo.pdb because chrome.exe and chrome.dll use chrome_exe.pdb - # and chrome_dll.pdb. - if not isinstance(args[0], str): - return args - - mutable_args = list(args) - mutable_args[0] = [args[0], args[0] + '.pdb'] - return tuple(mutable_args) - def ChromeProgram(env, *args, **kw): - if env['PLATFORM'] == 'win32': - # TODO(tc): We should handle kw['target'] too. - args = AddPdbToTarget(args) - return env.Program(*args, **kw) -env.AddMethod(ChromeProgram, "ChromeProgram") + return env.ComponentProgram(*args, **kw) +base_env.AddMethod(ChromeProgram) def ChromeTestProgram(env, *args, **kw): - if env['PLATFORM'] == 'win32': - # TODO(tc): We should handle kw['target'] too. - args = AddPdbToTarget(args) - return env.Program(*args, **kw) -env.AddMethod(ChromeTestProgram, "ChromeTestProgram") + return env.ComponentTestProgram(*args, **kw) +base_env.AddMethod(ChromeTestProgram) def ChromeStaticLibrary(env, *args, **kw): - result = env.StaticLibrary(*args, **kw) - if env['PLATFORM'] == 'win32': - # TODO(sgk): - # We'd like to do this with env.Install() like we do on other systems, - # but this causes problems on Windows when the Python copy of the file - # in one thread prevents a linker spawned by another thread from - # opening the copied .lib, despite the fact that the copy has - # successfully concluded before the spawn occurs. Work around the - # underlying problem (whatever it is) by calling the external Windows - # xcopy utility. - env.Command('$LIBS_DIR/${RESULT.name}', '$RESULT', - "xcopy /q /y $SOURCE ${TARGET.dir}", - RESULT=result[0]) - else: - env.Install('$LIBS_DIR', result) - return result -env.AddMethod(ChromeStaticLibrary, "ChromeStaticLibrary") + kw['COMPONENT_STATIC'] = True + return env.ComponentLibrary(*args, **kw) +base_env.AddMethod(ChromeStaticLibrary) def ChromeSharedLibrary(env, *args, **kw): - return env.SharedLibrary(*args, **kw) -env.AddMethod(ChromeSharedLibrary, "ChromeSharedLibrary") + kw['COMPONENT_STATIC'] = False + return env.ComponentLibrary(*args, **kw) +base_env.AddMethod(ChromeSharedLibrary) + +def ChromeObject(env, *args, **kw): + return env.ComponentObject(*args, **kw) +base_env.AddMethod(ChromeObject) + + +if ARGUMENTS.get('VERBOSE') in (None, '0'): + base_env['CCCOMSTR'] = 'Compiling $TARGET ...' + base_env['CXXCOMSTR'] = 'Compiling $TARGET ...' + base_env['SHCCCOMSTR'] = 'Compiling $TARGET ...' + base_env['SHCXXCOMSTR'] = 'Compiling $TARGET ...' + base_env['ARCOMSTR'] = 'Archiving $TARGET ...' + base_env['LINKCOMSTR'] = 'Linking $TARGET ...' + base_env['BINDINGSCOMSTR'] = 'Building bindings in $TARGET ...' + + + -if env['PLATFORM'] == 'win32': - processors = int(os.environ.get('NUMBER_OF_PROCESSORS', 1)) - SetOption('num_jobs', processors + 1) - msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV'] - # Use the absolute path for MSVC because it might not be on the same drive - # as our source checkout. - visual_studio_path = (msvs_env['PATH'][0] + - ':/Program Files/Microsoft Visual Studio 8') +#----------------------------------------------------------------------- - env.Replace( + + +# Create environment from which all Windows variants derive. +windows_env = base_env.Clone(tools = ['target_platform_windows']) +windows_env.Replace( CSCRIPT = 'c:\\Windows\\System32\\cscript', PLATFORMSDK_VISTA_REL = '../third_party/platformsdk_vista_6_0', PLATFORMSDK_VISTA = '#/$PLATFORMSDK_VISTA_REL', - VISUAL_STUDIO = visual_studio_path, - CYGWIN_DIR = Dir('#../third_party/cygwin'), + CYGWIN_DIR = '$MAIN_DIR/../third_party/cygwin', CYGWIN_BIN_DIR = '$CYGWIN_DIR/bin', PERL = '$CYGWIN_BIN_DIR/perl.exe', - MSVS_ENV = msvs_env, - YACC = '$CYGWIN_BIN_DIR/bison.exe', ARFLAGS = [ @@ -222,209 +254,230 @@ if env['PLATFORM'] == 'win32': '$PLATFORMSDK_VISTA/files/Include', '$PLATFORMSDK_VISTA/files/VC/INCLUDE', '$VISUAL_STUDIO/VC/atlmfc/include', + '$MAIN_DIR/..', ], LIBS = [ - 'advapi32.lib', - 'comdlg32.lib', - 'gdi32.lib', - 'kernel32.lib', - 'msimg32.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'psapi.lib', - 'shell32.lib', - 'user32.lib', - 'usp10.lib', - 'uuid.lib', - 'version.lib', - 'wininet.lib', - 'winspool.lib', - 'ws2_32.lib', - - 'DelayImp.lib', + 'advapi32', + 'comdlg32', + 'gdi32', + 'kernel32', + 'msimg32', + 'odbc32', + 'odbccp32', + 'ole32', + 'oleaut32', + 'psapi', + 'shell32', + 'user32', + 'usp10', + 'uuid', + 'version', + 'wininet', + 'winspool', + 'ws2_32', + + 'DelayImp', ], LINKFLAGS = [ '/nologo', '/DEBUG', ], - ICU_LIBS = ['icu'], ) - env.Append( +windows_env.Append( LIBPATH = [ '$PLATFORMSDK_VISTA/files/Lib', '$PLATFORMSDK_VISTA/files/VC/LIB', '$VISUAL_STUDIO/VC/atlmfc/lib', ], - ) +) - # TODO(sgk): remove once we upgrade to SCons 0.98.4 - for var in ['INCLUDE', 'LIB', 'PATH']: - msvs_env[var] = msvs_env[var].split('|', 1)[0] - env['ENV'][var] = env['ENV'][var].split('|', 1)[0] - - # Force scons to handle long include lines correctly. - pchcom_fixed = env['PCHCOM'] - pchcom_fixed = pchcom_fixed.replace('${TARGETS[0]}', '$TARGET') - pchcom_fixed = pchcom_fixed.replace('${TARGETS[1]}', '$TARGETS1') - - env.Replace( - CCCOM = "${TEMPFILE('%s')}" % env['CCCOM'], - CXXCOM = "${TEMPFILE('%s')}" % env['CXXCOM'], - SHCCCOM = "${TEMPFILE('%s')}" % env['SHCCCOM'], - SHCXXCOM = "${TEMPFILE('%s')}" % env['SHCXXCOM'], - PCHCOM = "${TEMPFILE('%s')}" % pchcom_fixed, - TARGETS1 = '${TARGETS[1]}', - ) +# Remove manifest gunk for now. +windows_env['LINKCOM'] = windows_env['LINKCOM'][0] +windows_env['SHLINKCOM'] = windows_env['SHLINKCOM'][0] - env['ENV']['PROGRAMFILES'] = os.environ['PROGRAMFILES'] - env['ENV']['SystemDrive'] = os.environ['SystemDrive'] - env['ENV']['USERPROFILE'] = os.environ['USERPROFILE'] - - env.AppendENVPath('PATH', ';C:\\WINDOWS\\system32') - -elif env['PLATFORM'] == 'posix': - - # Copy some environment variables from the outer environment if they exist. - for envvar in ['CC', 'CXX']: - if envvar in os.environ: - env[envvar] = os.environ[envvar] - # Provide $HOME when compiling so distcc can find its lock file. - env['ENV']['HOME'] = os.environ['HOME'] - if 'DISTCC_HOSTS' in os.environ: - env['ENV']['DISTCC_HOSTS'] = os.environ['DISTCC_HOSTS'] - - # TODO(evanm): this is Linux-specific, not posix. - # Parse /proc/cpuinfo for processor count. - cpus = len([l for l in open('/proc/cpuinfo') if l.startswith('processor\t')]) - SetOption('num_jobs', cpus + 1) - - # For now, linux only loads the components we know work on Linux, by default. - load = [ - 'base', - 'breakpad', - 'chrome', - 'googleurl', - 'net', - 'sdch', - 'skia', - 'testing', - 'third_party', - 'v8', - 'webkit', - ] - - excluded_warnings = [ +# TODO(sgk): find a more elegant way of doing this. +if base_env['PLATFORM'] == 'win32': + msvs_env = Environment(tools=['msvc', 'mslink', 'msvs'])['ENV'] + windows_env['VISUAL_STUDIO'] = (msvs_env['PATH'][0] + + ':/Program Files/Microsoft Visual Studio 8') + +# TODO(bradnelson): find a cleaner way of doing this. +# Force scons to handle long include lines correctly. +pchcom_fixed = windows_env['PCHCOM'] +pchcom_fixed = pchcom_fixed.replace('${TARGETS[0]}', '$TARGET') +pchcom_fixed = pchcom_fixed.replace('${TARGETS[1]}', '$TARGETS1') + +windows_env.Replace( + CCCOM = "${TEMPFILE('%s')}" % windows_env['CCCOM'], + CXXCOM = "${TEMPFILE('%s')}" % windows_env['CXXCOM'], + SHCCCOM = "${TEMPFILE('%s')}" % windows_env['SHCCCOM'], + SHCXXCOM = "${TEMPFILE('%s')}" % windows_env['SHCXXCOM'], + PCHCOM = "${TEMPFILE('%s')}" % pchcom_fixed, + TARGETS1 = '${TARGETS[1]}', +) + +# Create a debug windows variant. +debug_win_env = windows_env.Clone(tools = ['target_debug']) +debug_win_env.Replace( + BUILD_TYPE = 'debug-win', + BUILD_TYPE_DESCRIPTION = 'Windows debug variant', + BUILD_GROUPS = ['default'], +) + +# Create an optimized windows variant. +release_win_env = windows_env.Clone(tools = ['target_optimized']) +release_win_env.Replace( + BUILD_TYPE = 'release-win', + BUILD_TYPE_DESCRIPTION = 'Windows release variant', +) + + +#----------------------------------------------------------------------- + + + +excluded_warnings = [ # TODO: Clean up uses of ext/hash_map and remove this. # (see unordered_map and base/hash_tables.h) - '-Wno-deprecated', # Needed for using ext/hash_map on GCC 4.3 - '-Wno-unknown-pragmas', # In wtf's ref counting system - ] - env.Replace( - CCFLAGS = ['-m32', '-g', '-pthread'], - CXXFLAGS = ['-Wall', '-Werror'] + excluded_warnings, - LINKFLAGS = ['-m32', '-pthread'], + '-Wno-deprecated' # Needed for using ext/hash_map on GCC 4.3 +] + +# Create the base linux environment. +linux_env = base_env.Clone(tools = ['target_platform_linux']) +linux_env.Replace( + CCFLAGS = ['-m32', '-g', '-pthread'], + CXXFLAGS = ['-Wall', '-Werror'] + excluded_warnings, + LINKFLAGS = ['-m32', '-pthread'], # We need rt for clock_gettime. - LIBS = ['rt'], + LIBS = ['rt'], + ICU_LIBS = ['icu'], - PERL = '/usr/bin/perl', - PERL_INCLUDE_FLAG = '-I ', - PERL_INCLUDE_SUFFIX = '', - _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, ' - 'PERL_INCLUDE_PATH, ' - 'PERL_INCLUDE_SUFFIX,' - '__env__, RDirs, TARGET, SOURCE)}'), + PERL = '/usr/bin/perl', + PERL_INCLUDE_FLAG = '-I ', + PERL_INCLUDE_SUFFIX = '', + _PERL_INCLUDE_FLAGS = ('${_concat(PERL_INCLUDE_FLAG, ' + 'PERL_INCLUDE_PATH, ' + 'PERL_INCLUDE_SUFFIX,' + '__env__, RDirs, TARGET, SOURCE)}'), +) - ICU_LIBS = ['icu'], - ) - # Build with support for gcov when COVERAGE=1. - if ARGUMENTS.get('COVERAGE') == '1': - env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage']) - env.Append(LINKFLAGS=['-fprofile-arcs']) - - # Build with system-provided NSS and GTK. - env.ParseConfig('pkg-config --cflags --libs nss') - env.ParseConfig('pkg-config --cflags --libs gtk+-2.0') - -elif env['PLATFORM'] == 'darwin': - - # For now, mac only loads the components we know work on Mac, by default. - load = [ - 'base', - #'breakpad', - 'googleurl', - 'net', - 'sdch', - 'skia', - 'testing', - 'third_party', - #'webkit', - ] - - env.Replace( - # Reproduce XCode's behavior of using gcc even to link C++, - # and distinguishing it the -x c++ option. - CC = 'gcc-4.2', - CXX = 'g++-4.2', - LINK = '$CXX', - - CFLAGS = [ - '-std=c99', - ], - CXXFLAGS = [ - '-fvisibility-inlines-hidden', - '${str(SOURCE).endswith(".mm") and "-fobjc-gc" or ""}', - ], - CCFLAGS = [ - '-fmessage-length=0', - '-pipe', - '-O0', - '-mdynamic-no-pic', - '-Werror', - '-Wnewline-eof', - '-fvisibility=hidden', - '-gdwarf-2', - '-Wall', - '-Wendif-labels', - '-fstack-protector', - '-fstack-protector-all', - ], - CPPDEFINES = [ - 'DEBUG', - ], - - FRAMEWORKPATH = [ - env.Dir('${TARGET_ROOT}'), - '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks', - ], - FRAMEWORKS = [ - 'AppKit', - 'ApplicationServices', - 'Foundation', - ], - - ICU_LIBS = ['icui18n', 'icuuc', 'icudata'], - ) +# This conflicts with build_config.h +linux_env.FilterOut(CPPDEFINES= ['OS_LINUX=OS_LINUX']) + +linux_env.FilterOut( + BUILD_SCONSCRIPTS = [ + 'sandbox/src/SConscript', + 'third_party/libjpeg/SConscript', + 'third_party/libxml/SConscript', + 'third_party/libxslt/SConscript', + 'third_party/bspatch/SConscript', + 'webkit/SConscript', + ], +) -else: +linux_env.Append( + BUILD_SCONSCRIPTS = [ + 'third_party/libevent/SConscript', + ], +) + +# Build with support for gcov when COVERAGE=1. +if ARGUMENTS.get('COVERAGE') == '1': + linux_env.Append(CCFLAGS=['-fprofile-arcs', '-ftest-coverage']) + linux_env.Append(LINKFLAGS=['-fprofile-arcs']) + +# Build with system-provided NSS +if base_env['PLATFORM'] in ['posix', 'linux', 'linux2']: + linux_env.ParseConfig('pkg-config --cflags --libs nss') + linux_env.ParseConfig('pkg-config --cflags --libs glib-2.0') + linux_env.ParseConfig('pkg-config --cflags --libs gtk+-2.0') + +# Create a debug linux variant. +debug_linux_env = linux_env.Clone(tools = ['target_debug']) +debug_linux_env.Replace( + BUILD_TYPE = 'debug-linux', + BUILD_TYPE_DESCRIPTION = 'Linux debug variant', + BUILD_GROUPS = ['default'], +) - print "Unsupported SCons $PLATFORM value %s" % repr(env['PLATFORM']) - Exit(1) +# Create a optimized linux variant. +release_linux_env = linux_env.Clone(tools = ['target_optimized']) +release_linux_env.Replace( + BUILD_TYPE = 'release-linux', + BUILD_TYPE_DESCRIPTION = 'Linux release variant', +) + + + + +#----------------------------------------------------------------------- -if ARGUMENTS.get('VERBOSE') in (None, '0'): - env['CCCOMSTR'] = 'Compiling $TARGET ...' - env['CXXCOMSTR'] = 'Compiling $TARGET ...' - env['SHCCCOMSTR'] = 'Compiling $TARGET ...' - env['SHCXXCOMSTR'] = 'Compiling $TARGET ...' - env['ARCOMSTR'] = 'Archiving $TARGET ...' - env['LINKCOMSTR'] = 'Linking $TARGET ...' - env['BINDINGSCOMSTR'] = 'Building bindings in $TARGET ...' + +# Create the base environment for the mac variant. +mac_env = base_env.Clone(tools = ['target_platform_mac']) +mac_env.Replace( + # Reproduce XCode's behavior of using gcc even to link C++, + # and distinguishing it the -x c++ option. + CC = 'gcc-4.2', + CXX = 'g++-4.2', + LINK = '$CXX', + + CFLAGS = [ + '-std=c99', + ], + CXXFLAGS = [ + '-fvisibility-inlines-hidden', + '${str(SOURCE).endswith(".mm") and "-fobjc-gc" or ""}', + ], + CCFLAGS = [ + '-fmessage-length=0', + '-pipe', + '-O0', + '-mdynamic-no-pic', + '-Werror', + '-Wnewline-eof', + '-fvisibility=hidden', + '-gdwarf-2', + '-Wall', + '-Wendif-labels', + '-fstack-protector', + '-fstack-protector-all', + ], + CPPDEFINES = [ + 'DEBUG', + ], + + FRAMEWORKPATH = [ + '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks', + ], + FRAMEWORKS = [ + 'AppKit', + 'ApplicationServices', + 'Foundation', + ], + ICU_LIBS = ['icui18n', 'icuuc', 'icudata'], +) + +mac_env.FilterOut( + BUILD_SCONSCRIPTS = [ + 'third_party/libjpeg/SConscript', + 'third_party/libxml/SConscript', + 'third_party/libxslt/SConscript', + 'third_party/bspatch/SConscript', + 'webkit/SConscript', + ], +) + +mac_env.Append( + BUILD_SCONSCRIPTS = [ + 'third_party/libevent/SConscript', + ], +) # Add --clobber (for the buildbot). @@ -432,141 +485,66 @@ if ARGUMENTS.get('VERBOSE') in (None, '0'): AddOption('--clobber', action='store_true', dest='clobber', default=False, help='Delete build directory before building.') if GetOption('clobber'): - shutil.rmtree(env.Dir('$TARGET_ROOT').abspath, True) + shutil.rmtree(base_env.Dir('$DESTINATION_ROOT').abspath, True) + +# Create a mac debug variant. +debug_mac_env = mac_env.Clone(tools = ['target_debug']) +debug_mac_env.Replace( + BUILD_TYPE = 'debug-mac', + BUILD_TYPE_DESCRIPTION = 'Mac debug variant', + BUILD_GROUPS = ['default'], +) +# Create a mac opt variant. +release_mac_env = mac_env.Clone(tools = ['target_optimized']) +release_mac_env.Replace( + BUILD_TYPE = 'release-mac', + BUILD_TYPE_DESCRIPTION = 'Mac release variant', +) -# Place the .sconsign.dblite in the build directory. -target_dir = env.Dir('$TARGET_ROOT') -if not os.path.exists(target_dir.abspath): - Execute(Mkdir(target_dir)) -SConsignFile(target_dir.File('.sconsign').abspath) -# Use timestamps change, followed by MD5 for speed -env.Decider('MD5-timestamp') +#----------------------------------------------------------------------- -# Overlay things from a layer below. -env.Dir('$TARGET_ROOT').addRepository(Dir('..')) +Help(""" +PROGRESS=type Display a progress indicator: + name: print each evaluated target name + spinner: print a spinner every 5 targets +VERBOSE=1 Display full command lines +""") -included = [c for c in load if not c.startswith('-')] -excluded = [c[1:] for c in load if c.startswith('-')] -if not included: - included = ['all'] - -components = ['all'] - -def LoadComponent(c): - components.append(c) - return (not GetOption('help') and - c in included or - ('all' in included and not c in excluded)) - -sconscripts = [] - -if LoadComponent('base'): - sconscripts.append('$BASE_DIR/SConscript') - -if LoadComponent('breakpad'): - sconscripts.append('$BREAKPAD_DIR/SConscript') - -if LoadComponent('chrome'): - sconscripts.append('$CHROME_DIR/SConscript') - -if LoadComponent('gears'): - sconscripts.append('$GEARS_DIR/SConscript') - -if LoadComponent('google_update'): - sconscripts.append('$GOOGLE_UPDATE_DIR/SConscript') - -if LoadComponent('googleurl'): - # googleurl comes from a different repository so we provide the SConscript - # file. - sconscripts.append('SConscript.googleurl') - -if LoadComponent('net'): - sconscripts.append('$NET_DIR/SConscript') - -if LoadComponent('rlz'): - sconscripts.append('$RLZ_DIR/SConscript') - -if LoadComponent('sandbox'): - sconscripts.append('$SANDBOX_DIR/src/SConscript') - -if LoadComponent('sdch'): - sconscripts.append('$SDCH_DIR/SConscript') - -if LoadComponent('skia'): - sconscripts.append('$SKIA_DIR/SConscript') - -if LoadComponent('testing'): - sconscripts.append('$TESTING_DIR/SConscript.gtest') - -if LoadComponent('third_party'): - sconscripts.extend([ - '$BSDIFF_DIR/SConscript', - '$BZIP2_DIR/SConscript', - '$ICU38_DIR/SConscript', - '$LIBPNG_DIR/SConscript', - '$LZMA_SDK_DIR/SConscript', - '$MODP_B64_DIR/SConscript', - '$ZLIB_DIR/SConscript', - ]) - # Temporary until we get these building on Mac. - if env['PLATFORM'] != 'darwin': - sconscripts.extend([ - '$LIBJPEG_DIR/SConscript', - '$LIBXML_DIR/SConscript', - '$LIBXSLT_DIR/SConscript', - ]) - if env['PLATFORM'] in ('posix', 'darwin'): - sconscripts.extend([ - '$LIBEVENT_DIR/SConscript', - ]) - # This is temporary until we get this lib to build on other platforms. - if env['PLATFORM'] == 'win32': - sconscripts.extend([ - '$BSPATCH_DIR/SConscript', - ]) - -if LoadComponent('v8') and env.Dir('#/../v8').exists(): - env.SConscript('SConscript.v8', - exports=['env']) - -if LoadComponent('webkit'): - sconscripts.append('$WEBKIT_DIR/SConscript') - -env.SConscript(sconscripts, exports=['env']) - - -help_fmt = """ -Usage: hammer [SCONS_OPTIONS] [VARIABLES] [TARGET] ... - -Supported build variables: - - BUILD_TYPE=type Build type. Also used as the subdirectory name - in which the build occurs. - LOAD=[module,...] Comma-separated list of components to load in the - dependency graph ('-' prefix excludes): -%s - PROGRESS=type Display a progress indicator: - name: print each evaluated target name - spinner: print a spinner every 5 targets - VERBOSE=1 Display full command lines -""" - -if GetOption('help'): - import textwrap - tw = textwrap.TextWrapper( - width = 78, - initial_indent = ' '*32, - subsequent_indent = ' '*32, - ) - components = tw.fill(', '.join(components)) - Help(help_fmt % components) +#----------------------------------------------------------------------- + +# Build all programs and libraries by default. +Default([base_env.Alias('all_programs'), + base_env.Alias('all_libraries')]) + +# Create a list of all variants that are buildable. +environment_list = [ + debug_mac_env, + release_mac_env, + debug_win_env, + release_win_env, + debug_linux_env, + release_linux_env, +] +# For each variant in the environment_list, build the SConscript files in its +# BUILD_SCONSCRIPTS variable. +BuildComponents(environment_list) -Import('build_component') -Default(build_component) +#----------------------------------------------------------------------- + +# Generate a solution, defer to the end. +solution_env = base_env.Clone(tools = ['visual_studio_solution']) +solution = solution_env.Solution( + 'chrome_hammer', environment_list, + exclude_pattern = '.*third_party.*', + extra_build_targets = { + 'Firefox': 'c:/Program Files/Mozilla FireFox/firefox.exe', + }, +) +solution_env.Alias('solution', solution) diff --git a/build/SConscript.v8 b/build/SConscript.v8 index 8eeef09..7820f16 100644 --- a/build/SConscript.v8 +++ b/build/SConscript.v8 @@ -2,6 +2,9 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. + +import os + Import('env') # Grab the -j flag from the outer environment, if available. @@ -22,13 +25,16 @@ env = env.Clone( '--warn=no-no-parallel-support' + cpu_flag), ) +if env['PLATFORM'] == 'win32': + env['ENV']['ProgramFiles'] = os.environ['ProgramFiles'] + # Rather than build v8 with our own commands, we just shell out to v8's # own SCons-based build, since their build system is complicated. # This SConscript just declares dependencies on the outputs of that build. mksnapshot_exe = env.File('$V8_MODE_DIR/mksnapshot${PROGSUFFIX}') -libraries_obj = env.File('$V8_MODE_DIR/libraries${OBJSUFFIX}') libraries_empty_obj = env.File('$V8_MODE_DIR/libraries-empty${OBJSUFFIX}') +libraries_obj = env.File('$V8_MODE_DIR/libraries${OBJSUFFIX}') snapshot_obj = env.File('$V8_MODE_DIR/snapshot${OBJSUFFIX}') snapshot_empty_obj = env.File('$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}') v8_bin = env.File('$V8_SRC_DIR/shell${PROGSUFFIX}') @@ -64,20 +70,13 @@ env.AlwaysBuild(v8) # rebuild them (thereby causing us to always rebuild their dependents). env.Precious(v8) -env.Install('$V8_DIR', v8) - - -i = env.Install('$LIBS_DIR', v8_lib) -env.Alias('webkit', i) - -i = env.Install('$TARGET_ROOT', v8_bin) -env.Alias('chrome', i) +# TODO(bradnelson): remove if we confirm we no longer need this. # To satisfy tests expecting the following .exe name. -if env['PLATFORM'] == 'win32': - # TODO(evanm): this may be necessary on other platforms(?) - i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8_bin) - env.Alias('chrome', i) +#if env['PLATFORM'] == 'win32': +# # TODO(evanm): this may be necessary on other platforms(?) +# i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8_bin) +# env.Alias('chrome', i) env.ChromeStaticLibrary('v8_snapshot', [libraries_empty_obj, snapshot_obj]) diff --git a/chrome/SConstruct b/chrome/SConstruct index dd84b36..4afcb75 100644 --- a/chrome/SConstruct +++ b/chrome/SConstruct @@ -5,4 +5,3 @@ build_component = 'chrome' SConscript('../build/SConscript.main', exports=['build_component']) - diff --git a/net/SConscript b/net/SConscript index 37d6c18..b862b91 100644 --- a/net/SConscript +++ b/net/SConscript @@ -14,7 +14,7 @@ env.Prepend( '$ICU38_DIR/public/common', '$ICU38_DIR/public/i18n', '$SDCH_DIR/open-vcdiff/src', - '..', + '$ROOT_DIR', ], ) @@ -166,7 +166,7 @@ env.ChromeStaticLibrary('net', input_files) env_tests.Prepend( CPPPATH = [ - '..', + '$ROOT_DIR', ], CPPDEFINES = [ 'UNIT_TEST', @@ -221,6 +221,9 @@ if env['PLATFORM'] in ('posix', 'darwin'): ) +disk_cache_test_util = env.ChromeObject('disk_cache/disk_cache_test_util.cc') + + unittest_files = [ 'base/auth_cache_unittest.cc', 'base/base64_unittest.cc', @@ -244,7 +247,6 @@ unittest_files = [ 'disk_cache/backend_unittest.cc', 'disk_cache/block_files_unittest.cc', 'disk_cache/disk_cache_test_base.cc', - 'disk_cache/disk_cache_test_util.cc', 'disk_cache/entry_unittest.cc', 'disk_cache/mapped_file_unittest.cc', 'disk_cache/storage_block_unittest.cc', @@ -254,6 +256,7 @@ unittest_files = [ 'http/http_chunked_decoder_unittest.cc', 'http/http_response_headers_unittest.cc', 'http/http_vary_data_unittest.cc', + disk_cache_test_util, ] if env['PLATFORM'] == 'win32': @@ -286,12 +289,12 @@ if env['PLATFORM'] in ('posix', 'win32'): net_perftests = env_tests.ChromeTestProgram( 'net_perftests', - ['disk_cache/disk_cache_test_util.cc', - 'disk_cache/disk_cache_perftest.cc', + ['disk_cache/disk_cache_perftest.cc', + disk_cache_test_util, 'base/cookie_monster_perftest.cc', # TODO(sgk): avoid using .cc from base directly - '$BASE_DIR/run_all_perftests$OBJSUFFIX', - '$BASE_DIR/perftimer$OBJSUFFIX'] + '$OBJ_ROOT/base/run_all_perftests$OBJSUFFIX', + '$OBJ_ROOT/base/perftimer$OBJSUFFIX'] ) install_targets.extend([ @@ -302,13 +305,13 @@ if env['PLATFORM'] == 'win32': stress_cache = env_tests.ChromeTestProgram( 'stress_cache', ['disk_cache/stress_cache.cc', - 'disk_cache/disk_cache_test_util.cc'] + disk_cache_test_util], ) crash_cache = env_tests.ChromeTestProgram( 'crash_cache', ['tools/crash_cache/crash_cache.cc', - 'disk_cache/disk_cache_test_util.cc'] + disk_cache_test_util], ) install_targets.extend([ @@ -317,14 +320,14 @@ if env['PLATFORM'] == 'win32': ]) -# Create install of tests. -installed_tests = env.Install('$TARGET_ROOT', install_targets) +# Install tests where the buildbot expects them. +installed_tests = env.Install('$MAIN_DIR/Hammer', install_targets) if env['PLATFORM'] == 'win32': - env_res.Append( + env_res.Prepend( CPPPATH = [ - '..', + '$ROOT_DIR', ], RCFLAGS = [ ['/l', '0x409'], diff --git a/net/tools/tld_cleanup/SConscript b/net/tools/tld_cleanup/SConscript index 5ab7e82..415bef7 100644 --- a/net/tools/tld_cleanup/SConscript +++ b/net/tools/tld_cleanup/SConscript @@ -8,7 +8,7 @@ env = env.Clone() env.Prepend( CPPPATH = [ - '../../..', + '$ROOT_DIR', ], LIBS = [ 'googleurl', @@ -49,4 +49,3 @@ i = env.Install('$TARGET_ROOT', exe_targets) env.Alias('net', i) env.Install('$TARGET_ROOT', exe_targets) - diff --git a/sandbox/src/SConscript b/sandbox/src/SConscript index 8914ba2..961257b 100644 --- a/sandbox/src/SConscript +++ b/sandbox/src/SConscript @@ -10,6 +10,7 @@ env = env.Clone() # in the base env here, not just in env_tests. env.Prepend( CPPPATH = [ + '$ROOT_DIR', '$GTEST_DIR/include', '$GTEST_DIR', '../..', @@ -27,8 +28,10 @@ env.Append( ], ) +env.Dir('$OBJ_ROOT/sandbox/src').addRepository(env.Dir('$ROOT_DIR/sandbox')) + env_tests = env.Clone( - TESTS_DIR = '../tests', + TESTS_DIR = 'tests', INTEGRATION_TESTS_DIR = '$TESTS_DIR/integration_tests', UNIT_TESTS_DIR = '$TESTS_DIR/unit_tests', VALIDATION_TESTS_DIR = '$TESTS_DIR/validation_tests', @@ -158,6 +161,8 @@ unit_test_files = [ # TODO(bradnelson): This step generates unittests_tests.pch.ib_tag # SCons doesn't know. env_p = env_unit_tests.Clone() +# TODO(bradnelson): Make this automatic. +env_p['COMPONENT_PLATFORM_SETUP'](env_p, 'ComponentTestProgram') pch, obj = env_p.PCH(['$UNIT_TESTS_DIR/unit_tests.pch', '$UNIT_TESTS_DIR/unit_tests.obj'], '$UNIT_TESTS_DIR/unit_tests.cc') @@ -201,6 +206,8 @@ integration_test_files = [ # TODO(bradnelson): This step generates integration_tests.pch.ib_tag # SCons doesn't know. env_p = env_integration_tests.Clone() +# TODO(bradnelson): Make this automatic. +env_p['COMPONENT_PLATFORM_SETUP'](env_p, 'ComponentTestProgram') pch, obj = env_p.PCH(['$INTEGRATION_TESTS_DIR/integration_tests.pch', '$INTEGRATION_TESTS_DIR/integration_tests.obj'], '$INTEGRATION_TESTS_DIR/integration_tests.cc') @@ -233,7 +240,8 @@ validation_test_files = [ ] env_p = env_validation_tests.Clone() - +# TODO(bradnelson): Make this automatic. +env_p['COMPONENT_PLATFORM_SETUP'](env_p, 'ComponentTestProgram') # TODO(bradnelson): This step generates unittests_tests.pch.ib_tag # SCons doesn't know. pch, obj = env_p.PCH(['$VALIDATION_TESTS_DIR/unit_tests.pch', @@ -249,11 +257,10 @@ validation_tests = env_validation_tests.ChromeTestProgram( ) -# Install tests to a path where they can find their inputs. -installed_tests = env.Install('$OBJ_ROOT', +# Install tests to where the buildbot expects them for now. +installed_tests = env.Install('$MAIN_DIR/Hammer', unit_tests + validation_tests + integration_tests) # Setup alias for sandbox related targets. env.Alias('sandbox', ['.', installed_tests]) - diff --git a/third_party/bsdiff/SConscript b/third_party/bsdiff/SConscript index e1408c8..176f29f 100644 --- a/third_party/bsdiff/SConscript +++ b/third_party/bsdiff/SConscript @@ -34,7 +34,7 @@ env = env.Clone() env.Prepend( CPPPATH = [ - '../bspatch', + '$BSPATCH_DIR', ] ) diff --git a/webkit/SConscript b/webkit/SConscript index 519e809..3ea66af 100644 --- a/webkit/SConscript +++ b/webkit/SConscript @@ -81,7 +81,9 @@ env.Prepend( '$ZLIB_DIR', '$LIBPNG_DIR', '$LIBJPEG_DIR', + '$LIBXSLT_DIR/scons', '$LIBXSLT_DIR', + '$LIBXML_DIR/scons/include', '$LIBXML_DIR/include', '$LIBXML_DIR/DerivedSources/include', '$ICU38_DIR/public/common', @@ -91,8 +93,8 @@ env.Prepend( '$SKIA_DIR/platform', '$NPAPI_DIR', '$V8_DIR/include', - '$WEBKIT_DIR/V8Bindings/DerivedSources', - '$WEBKIT_DIR/V8Bindings/SharedSources', + '$DERIVED_DIR', + '$SHARED_DIR', '$WEBKIT_DIR/port/bindings/v8', '$WEBKIT_DIR/WebCore', '$WEBKIT_DIR/WebCore/JavaScriptHeaders', @@ -144,10 +146,13 @@ env.Prepend( '$WEBKIT_DIR/port/svg/animation', '$WEBKIT_DIR/port/svg/graphics/filters', - '#/..', + '$ROOT_DIR', ], ) +if env.Bit('windows'): + env.Append(CPPPATH = ['$WEBKIT_DIR/port/page/win']) + env.Append( WEBCORE_DIR = "$THIRD_PARTY_WEBKIT_DIR/WebCore", PENDING_DIR = "$WEBKIT_DIR/pending", @@ -159,8 +164,8 @@ env.Append( PCRE_DIR = "$JAVASCRIPTCORE_DIR/pcre", V8BINDINGS_DIR = "$WEBKIT_DIR/V8Bindings", - DERIVED_DIR = env.Dir("$WEBKIT_DIR/V8Bindings/DerivedSources"), - SHARED_DIR = env.Dir("$WEBKIT_DIR/V8Bindings/SharedSources"), + DERIVED_DIR = "$WEBKIT_DIR/V8Bindings/DerivedSources", + SHARED_DIR = "$WEBKIT_DIR/V8Bindings/SharedSources", # This is a stop gap to get linux building in time for the webkit # merge. The true fix is to move the above CPPPATH prepend under this @@ -280,4 +285,3 @@ version = env.Command('$WEBKIT_DIR/build/WebCore/webkit_version.h', '#/../webkit/build/webkit_version.py'], "$PYTHON ${SOURCES[1]} ${SOURCES[0]} ${TARGET.dir}") env.AlwaysBuild(version) - diff --git a/webkit/activex_shim/SConscript b/webkit/activex_shim/SConscript index cf235e6..bf2c5fc2 100644 --- a/webkit/activex_shim/SConscript +++ b/webkit/activex_shim/SConscript @@ -9,7 +9,7 @@ env = env.Clone() env.Prepend( CPPPATH = [ '$NPAPI_DIR', - '#/..', + '$ROOT_DIR', ], ) @@ -41,4 +41,3 @@ input_files = [ ] env.ChromeStaticLibrary('activex_shim', input_files) - diff --git a/webkit/activex_shim_dll/SConscript b/webkit/activex_shim_dll/SConscript index a4dc1b2..29d4092 100644 --- a/webkit/activex_shim_dll/SConscript +++ b/webkit/activex_shim_dll/SConscript @@ -44,6 +44,5 @@ input_files = [ ] dll = env.ChromeSharedLibrary('npaxshim', input_files) -i = env.Install('$TARGET_ROOT', dll) +i = env.Replicate('$MAIN_DIR/Hammer', dll[0]) env.Alias('webkit', i) - diff --git a/webkit/build/port/SConscript b/webkit/build/port/SConscript index b1e27e2..7a9de8f 100644 --- a/webkit/build/port/SConscript +++ b/webkit/build/port/SConscript @@ -16,7 +16,6 @@ cygwin_posix = cygwin.abspath.replace('\\', '/') pending = env.Dir('#../webkit/pending') portroot = env.Dir('#../webkit/port') webkit_build = env.Dir('#../webkit/build') -bindings_output_dir = env.Dir('#/../webkit/$BUILD_TYPE/scons/V8Bindings') def PosixIncludes(env, prefix, files, suffix): @@ -477,7 +476,7 @@ idl_files = [ ] for subdir in set([os.path.dirname(n) for n in idl_files]): - dir = env.Dir('#/$BUILD_TYPE/webkit/port/' + subdir) + dir = env.Dir('$OBJ_ROOT/webkit/port/' + subdir) dir.addRepository(env.Dir('#/../webkit/pending')) dir.addRepository(env.Dir('#/../webkit/port/' + subdir)) diff --git a/webkit/default_plugin/SConscript b/webkit/default_plugin/SConscript index 571e64d..2cad465 100644 --- a/webkit/default_plugin/SConscript +++ b/webkit/default_plugin/SConscript @@ -14,6 +14,8 @@ env.Prepend( '#/../third_party/libxml/include', '#/../third_party/npapi', '#/..', +# TODO(bradnelson): this might be needed? +# '$OBJ_ROOT/webkit/build/localized_strings', ], ) @@ -51,4 +53,3 @@ if env['PLATFORM'] == 'win32': ]) env.ChromeStaticLibrary('default_plugin', input_files) - diff --git a/webkit/glue/plugins/test/SConscript b/webkit/glue/plugins/test/SConscript index 3e90365..bfdc821 100644 --- a/webkit/glue/plugins/test/SConscript +++ b/webkit/glue/plugins/test/SConscript @@ -69,18 +69,7 @@ if env['PLATFORM'] == 'win32': ], ) - dll = env.ChromeSharedLibrary([ - 'npapi_test_plugin', - 'npapi_test_plugin.lib', - 'npapi_test_plugin.ilk', - 'npapi_test_plugin.pdb' - ], input_files) +dll = env.ChromeSharedLibrary('npapi_test_plugin', input_files) - # TODO(sgk): goes away once ChromeSharedLibrary does this for us. - env.Install('$LIBS_DIR', dll[1]) -else: - dll = env.ChromeSharedLibrary(['npapi_test_plugin'], input_files) - -i = env.Install('$TARGET_ROOT', dll) +i = env.Replicate('$MAIN_DIR/Hammer', dll[0]) env.Alias('webkit', i) - diff --git a/webkit/tools/npapi_layout_test_plugin/SConscript b/webkit/tools/npapi_layout_test_plugin/SConscript index 4b2da51..329fb92 100644 --- a/webkit/tools/npapi_layout_test_plugin/SConscript +++ b/webkit/tools/npapi_layout_test_plugin/SConscript @@ -45,23 +45,7 @@ if env['PLATFORM'] == 'win32': ], ) -if env['PLATFORM'] == 'win32': - dll = env.ChromeSharedLibrary([ - 'npapi_layout_test_plugin', - 'npapi_layout_test_plugin.lib', - 'npapi_layout_test_plugin.ilk', - 'npapi_layout_test_plugin.pdb' - ], input_files) - - # TODO(sgk): goes away when env.ChromeSharedLibrary() knows how - # to do this for us. - env.Install('$LIBS_DIR', dll[1]) -else: - dll = env.ChromeSharedLibrary(['npapi_layout_test_plugin'], input_files) + dll = env.ChromeSharedLibrary('npapi_layout_test_plugin', input_files) -i = env.Install('$TARGET_ROOT/plugins', dll) +i = env.Install('$MAIN_DIR/Hammer', dll[0]) env.Alias('webkit', i) - -i = env.Install('$TARGET_ROOT', dll) -env.Alias('webkit', i) - diff --git a/webkit/tools/test_shell/SConscript b/webkit/tools/test_shell/SConscript index 1fd70e631..03d5c3f 100644 --- a/webkit/tools/test_shell/SConscript +++ b/webkit/tools/test_shell/SConscript @@ -25,6 +25,7 @@ env.Append( '$WEBKIT_DIR/glue', '$GTEST_DIR/include', ], + LIBPATH = ['$V8_DIR'], LIBS = [ 'test_shell', 'glue', @@ -92,12 +93,16 @@ elif env['PLATFORM'] in ('posix', 'darwin'): ] ) -input_files = [ +common_objs = [env.ChromeObject(i) for i in [ 'test_navigation_controller.cc', 'test_shell_switches.cc', +]] + + +input_files = [ + common_objs, ] if env['PLATFORM'] == 'win32': - # TODO(port): put portable files in above test_files declaration. input_files.extend([ 'drag_delegate.cc', 'drop_delegate.cc', @@ -128,13 +133,13 @@ if env['PLATFORM'] == 'win32': # TODO(port): figure out what to do with resources. resources = [ env_res.RES('resources/test_shell.rc'), - '$NET_DIR/net_resources.res', + '$OBJ_ROOT/net/net_resources.res', '$WEBKIT_DIR/build/localized_strings/webkit_strings_en-US.res', ] exe_input_files = [ 'test_shell_main.cc', - '$V8_DIR/snapshot-empty$OBJSUFFIX' + '$V8_DIR/obj/release/snapshot-empty$OBJSUFFIX' ] elif env['PLATFORM'] == 'posix': exe_input_files = [ @@ -150,33 +155,52 @@ if env['PLATFORM'] == 'win32': env.Depends(test_shell, '$V8_DIR/vc80.pdb') test_files = [ - 'run_all_tests.cc', + common_objs, + 'image_decoder_unittest.cc', + 'keyboard_unittest.cc', + 'layout_test_controller_unittest.cc', + 'node_leak_test.cc', + 'plugin_tests.cc', + 'run_all_tests.cc', + 'test_shell_test.cc', + 'text_input_controller_unittest.cc', + '$WEBKIT_DIR/glue/autocomplete_input_listener_unittest.cc', + '$WEBKIT_DIR/glue/bookmarklet_unittest.cc', + '$WEBKIT_DIR/glue/context_menu_unittest.cc', + '$WEBKIT_DIR/glue/cpp_bound_class_unittest.cc', + '$WEBKIT_DIR/glue/cpp_variant_unittest.cc', + '$WEBKIT_DIR/glue/dom_operations_unittest.cc', + '$WEBKIT_DIR/glue/dom_serializer_unittest.cc', + '$WEBKIT_DIR/glue/glue_serialize_unittest.cc', + '$WEBKIT_DIR/glue/iframe_redirect_unittest.cc', + '$WEBKIT_DIR/glue/mimetype_unittest.cc', + '$WEBKIT_DIR/glue/multipart_response_delegate_unittest.cc', + '$WEBKIT_DIR/glue/password_autocomplete_listener_unittest.cc', + '$WEBKIT_DIR/glue/regular_expression_unittest.cc', + '$WEBKIT_DIR/glue/resource_fetcher_unittest.cc', + # Commented out until a regression is fixed and this file is restored. + #'$WEBKIT_DIR/glue/stringimpl_unittest.cc', + '$WEBKIT_DIR/glue/webframe_unittest.cc', + '$WEBKIT_DIR/glue/webplugin_impl_unittest.cc', + '$WEBKIT_DIR/port/platform/GKURL_unittest.cpp', + '$WEBKIT_DIR/port/platform/image-decoders/bmp/BMPImageDecoder_unittest.cpp', + '$WEBKIT_DIR/port/platform/image-decoders/ico/ICOImageDecoder_unittest.cpp', + '$WEBKIT_DIR/port/platform/image-decoders/xbm/XBMImageDecoder_unittest.cpp', + + '$V8_DIR/obj/release/snapshot-empty$OBJSUFFIX', ] if env['PLATFORM'] == 'win32': # TODO(port): put portable files in above test_files declaration. test_files.extend([ - 'drag_delegate.cc', - 'drop_delegate.cc', - 'event_sending_controller.cc', 'image_decoder_unittest.cc', 'keyboard_unittest.cc', - 'layout_test_controller.cc', 'layout_test_controller_unittest.cc', 'node_leak_test.cc', 'plugin_tests.cc', 'run_all_tests.cc', - 'simple_resource_loader_bridge.cc', - 'test_navigation_controller.cc', - 'test_shell.cc', - 'test_shell_request_context.cc', - 'test_shell_switches.cc', 'test_shell_test.cc', - 'test_webview_delegate.cc', - 'text_input_controller.cc', 'text_input_controller_unittest.cc', - 'webview_host.cc', - 'webwidget_host.cc', '$WEBKIT_DIR/glue/autocomplete_input_listener_unittest.cc', '$WEBKIT_DIR/glue/bookmarklet_unittest.cc', '$WEBKIT_DIR/glue/context_menu_unittest.cc', @@ -200,11 +224,10 @@ if env['PLATFORM'] == 'win32': '$WEBKIT_DIR/port/platform/image-decoders/ico/ICOImageDecoder_unittest.cpp', '$WEBKIT_DIR/port/platform/image-decoders/xbm/XBMImageDecoder_unittest.cpp', - '$V8_DIR/snapshot-empty$OBJSUFFIX', + '$V8_DIR/obj/release/snapshot-empty$OBJSUFFIX' ]) test_shell_tests = env.ChromeTestProgram('test_shell_tests', resources + test_files) i = env.Install('$TARGET_ROOT', test_shell_tests) env.Alias('webkit', i) - |