diff options
author | Bo Liu <boliu@google.com> | 2014-05-01 10:37:37 -0700 |
---|---|---|
committer | Bo Liu <boliu@google.com> | 2014-05-01 10:37:37 -0700 |
commit | 5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1 (patch) | |
tree | 5df224c921d52ab02739b38e2149652208b023e6 /build | |
parent | 56e9d6e218656f3d05620cc9877fd61482337fb1 (diff) | |
download | chromium_org-5c02ac1a9c1b504631c0a3d2b6e737b5d738bae1.tar.gz |
Merge from Chromium at DEPS revision 267519
This commit was generated by merge_to_master.py.
Change-Id: I6002987b71e09742c68bad9c834ae800ff531f25
Diffstat (limited to 'build')
23 files changed, 229 insertions, 132 deletions
diff --git a/build/all.gyp b/build/all.gyp index c4c1ce1d4b..ac14c86eaf 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -46,6 +46,7 @@ 'dependencies': [ '../content/content_shell_and_tests.gyp:content_shell_apk', '../mojo/mojo.gyp:mojo_shell_apk', + '../mojo/mojo.gyp:mojo_test_apk', '<@(android_app_targets)', 'android_builder_tests', '../android_webview/android_webview.gyp:android_webview_apk', @@ -125,6 +126,7 @@ }], ['OS=="mac"', { 'dependencies': [ + '../sandbox/sandbox.gyp:*', '../third_party/ocmock/ocmock.gyp:*', ], }], @@ -384,15 +386,13 @@ '../ash/ash.gyp:ash_unittests', ], }], + ['disable_nacl==0', { + 'dependencies': [ + '../components/nacl.gyp:nacl_loader_unittests', + ], + }], ], }, # target_name: chromium_builder_tests - { - 'target_name': 'chromium_2010_builder_tests', - 'type': 'none', - 'dependencies': [ - 'chromium_builder_tests', - ], - }, # target_name: chromium_2010_builder_tests ], 'conditions': [ ['OS!="ios"', { @@ -742,11 +742,6 @@ '../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test', '../ui/events/events.gyp:events_unittests', '../ui/ui_unittests.gyp:ui_unittests', - # Required by ui_unittests. - # TODO(wangxianzhu): It'd better let ui_unittests depend on it, but - # this would cause circular gyp dependency which needs refactoring the - # gyps to resolve. - '../chrome/chrome_resources.gyp:packed_resources', ], 'conditions': [ ['"<(gtest_target_type)"=="shared_library"', { diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py index 10dfa15111..dc2212b229 100755 --- a/build/android/buildbot/bb_device_steps.py +++ b/build/android/buildbot/bb_device_steps.py @@ -35,6 +35,7 @@ import errors SLAVE_SCRIPTS_DIR = os.path.join(bb_utils.BB_BUILD_DIR, 'scripts', 'slave') LOGCAT_DIR = os.path.join(bb_utils.CHROME_OUT_DIR, 'logcat') GS_URL = 'https://storage.googleapis.com' +GS_AUTH_URL = 'https://storage.cloud.google.com' # Describes an instrumation test suite: # test: Name of test we're running. @@ -78,7 +79,7 @@ INSTRUMENTATION_TESTS = dict((suite.name, suite) for suite in [ 'webview:android_webview/test/data/device_files'), ]) -VALID_TESTS = set(['chromedriver', 'gpu', 'telemetry_perf_unittests', +VALID_TESTS = set(['chromedriver', 'gpu', 'mojo', 'telemetry_perf_unittests', 'ui', 'unit', 'webkit', 'webkit_layout', 'webrtc_chromium', 'webrtc_native']) @@ -181,6 +182,20 @@ def RunTelemetryPerfUnitTests(options): RunCmd(['tools/perf/run_tests'] + args) +def RunMojoTests(options): + """Runs the mojo unit tests. + + Args: + options: options object. + """ + test = I('MojoTest', + None, + 'org.chromium.mojo.tests', + 'MojoTest', + None) + RunInstrumentationSuite(options, test) + + def InstallApk(options, test, print_step=False): """Install an apk to all phones. @@ -212,9 +227,11 @@ def RunInstrumentationSuite(options, test, flunk_on_failure=True, """ bb_annotations.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) - InstallApk(options, test) - args = ['--test-apk', test.test_apk, '--test_data', test.test_data, - '--verbose'] + if test.apk: + InstallApk(options, test) + args = ['--test-apk', test.test_apk, '--verbose'] + if test.test_data: + args.extend(['--test_data', test.test_data]) if options.target == 'Release': args.append('--release') if options.asan: @@ -497,6 +514,7 @@ def GetTestStepCmds(): return [ ('chromedriver', RunChromeDriverTests), ('gpu', RunGPUTests), + ('mojo', RunMojoTests), ('telemetry_perf_unittests', RunTelemetryPerfUnitTests), ('unit', RunUnitTests), ('ui', RunInstrumentationTests), @@ -512,6 +530,8 @@ def MakeGSPath(options, gs_base_dir): bot_id = options.build_properties.get('buildername', 'testing') randhash = hashlib.sha1(str(random.random())).hexdigest() gs_path = '%s/%s/%s/%s' % (gs_base_dir, bot_id, revision, randhash) + # remove double slashes, happens with blank revisions and confuses gsutil + gs_path = re.sub('/+', '/', gs_path) return gs_path def UploadHTML(options, gs_base_dir, dir_to_upload, link_text, @@ -553,8 +573,9 @@ def LogcatDump(options): RunCmd([SrcPath('build' , 'android', 'adb_logcat_printer.py'), '--output-path', logcat_file, LOGCAT_DIR]) gs_path = MakeGSPath(options, 'chromium-android/logcat_dumps') - RunCmd([bb_utils.GSUTIL_PATH, 'cp', logcat_file, 'gs://%s' % gs_path]) - bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_URL, gs_path)) + RunCmd([bb_utils.GSUTIL_PATH, '-h', 'Content-Type:text/plain', + 'cp', logcat_file, 'gs://%s' % gs_path]) + bb_annotations.PrintLink('logcat dump', '%s/%s' % (GS_AUTH_URL, gs_path)) def RunStackToolSteps(options): diff --git a/build/android/buildbot/bb_run_bot.py b/build/android/buildbot/bb_run_bot.py index f41ae6470f..1ecf7f08a9 100755 --- a/build/android/buildbot/bb_run_bot.py +++ b/build/android/buildbot/bb_run_bot.py @@ -119,6 +119,7 @@ def GetBotStepMap(): std_build_steps = ['compile', 'zip_build'] std_test_steps = ['extract_build'] std_tests = ['ui', 'unit'] + fyi_tests = std_tests + ['mojo'] telemetry_tests = ['telemetry_perf_unittests'] flakiness_server = ( '--flakiness-server=%s' % constants.UPSTREAM_FLAKINESS_SERVER) @@ -139,8 +140,9 @@ def GetBotStepMap(): B('main-clang-builder', H(compile_step, extra_gyp='clang=1 component=shared_library')), B('main-clobber', H(compile_step)), - B('main-tests', H(std_test_steps), T(std_tests + telemetry_tests, - [flakiness_server])), + B('main-tests-rel', H(std_test_steps), T(std_tests + telemetry_tests, + [flakiness_server])), + B('main-tests', H(std_test_steps), T(std_tests, [flakiness_server])), # Other waterfalls B('asan-builder-tests', H(compile_step, @@ -158,7 +160,7 @@ def GetBotStepMap(): H(compile_step + std_host_tests, target_arch='x86')), B('fyi-builder-rel', H(std_build_steps, experimental)), B('fyi-tests', H(std_test_steps), - T(std_tests, ['--experimental', flakiness_server, + T(fyi_tests, ['--experimental', flakiness_server, '--coverage-bucket', CHROMIUM_COVERAGE_BUCKET])), B('fyi-component-builder-tests-dbg', H(compile_step, extra_gyp='component=shared_library'), @@ -200,6 +202,7 @@ def GetBotStepMap(): ('try-clang-builder', 'main-clang-builder'), ('try-fyi-builder-dbg', 'fyi-builder-dbg'), ('try-x86-builder-dbg', 'x86-builder-dbg'), + ('try-tests-rel', 'main-tests-rel'), ('try-tests', 'main-tests'), ('try-fyi-tests', 'fyi-tests'), ('webkit-latest-tests', 'main-tests'), diff --git a/build/android/findbugs_filter/findbugs_known_bugs.txt b/build/android/findbugs_filter/findbugs_known_bugs.txt index 082a9e98b4..3b825a61c8 100644 --- a/build/android/findbugs_filter/findbugs_known_bugs.txt +++ b/build/android/findbugs_filter/findbugs_known_bugs.txt @@ -1,5 +1,4 @@ H C EC: Using pointer equality to compare a JavaBridgeCoercionTest$CustomType with a JavaBridgeCoercionTest$CustomType2 in org.chromium.content.browser.JavaBridgeCoercionTest.testPassJavaObject() At JavaBridgeCoercionTest.java -H P Bx: Boxing/unboxing to parse a primitive org.chromium.content.browser.ViewportTest.evaluateIntegerValue(String) At ViewportTest.java M B RV: Exceptional return value of java.io.File.delete() ignored in org.chromium.base.test.util.TestFileUtil.deleteFile(String) At TestFileUtil.java M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayCoercionTest.java M C CSM: Shouldn't use synchronized method, please narrow down the synchronization scope. At JavaBridgeArrayTest.java @@ -16,10 +15,8 @@ M C CST: Shouldn't use synchronized(this), please narrow down the synchronizatio M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testAutoBadPath() At ArchiveTest.java M D DMI: Hard coded reference to an absolute pathname in org.chromium.android_webview.test.ArchiveTest.testExplicitBadPath() At ArchiveTest.java M D SF: Switch statement found in org.chromium.chrome.browser.ChromeBrowserProvider.insert(Uri, ContentValues) where one case falls through to the next case At ChromeBrowserProvider.java -M D SF: Switch statement found in org.chromium.chrome.browser.database.SQLiteCursor.fillWindow(int, CursorWindow) where default case is missing At SQLiteCursor.java M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getBooleanValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setBooleanValue(boolean) is synchronized At JavaBridgeReturnValuesTest.java M M UG: org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.getStringValue() is unsynchronized, org.chromium.content.browser.JavaBridgeReturnValuesTest$TestObject.setStringValue(String) is synchronized At JavaBridgeReturnValuesTest.java -M V EI2: new org.chromium.chrome.browser.FindMatchRectsDetails(int, RectF[], RectF) may expose internal representation by storing an externally mutable object into FindMatchRectsDetails.rects At FindMatchRectsDetails.java M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setFavicon(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mFavicon At ChromeBrowserProvider.java M V EI2: org.chromium.chrome.browser.ChromeBrowserProvider$BookmarkNode.setThumbnail(byte[]) may expose internal representation by storing an externally mutable object into ChromeBrowserProvider$BookmarkNode.mThumbnail At ChromeBrowserProvider.java M V EI2: org.chromium.content.browser.LoadUrlParams.setPostData(byte[]) may expose internal representation by storing an externally mutable object into LoadUrlParams.mPostData At LoadUrlParams.java diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py index 6dc320ad2c..1faa4d22a8 100755 --- a/build/android/provision_devices.py +++ b/build/android/provision_devices.py @@ -123,6 +123,7 @@ def ProvisionDevices(options): devices = android_commands.GetAttachedDevices() for device_serial in devices: device = device_utils.DeviceUtils(device_serial) + device.old_interface.EnableAdbRoot() install_output = GetCmdOutput( ['%s/build/android/adb_install_apk.py' % constants.DIR_SOURCE_ROOT, '--apk', @@ -140,6 +141,9 @@ def ProvisionDevices(options): device_settings.ConfigureContentSettingsDict( device, device_settings.NETWORK_DISABLED_SETTINGS) device.old_interface.RunShellCommandWithSU('date -u %f' % time.time()) + (_, props) = device.old_interface.GetShellCommandStatusAndOutput('getprop') + for prop in props: + print prop if options.auto_reconnect: PushAndLaunchAdbReboot(devices, options.target) diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py index b734d17597..0a710f9e0e 100644 --- a/build/android/pylib/android_commands.py +++ b/build/android/pylib/android_commands.py @@ -297,6 +297,8 @@ class AndroidCommands(object): 'command': None, 'cached': False, } + self._protected_file_access_method_initialized = None + self._privileged_command_runner = None @property def system_properties(self): @@ -637,9 +639,10 @@ class AndroidCommands(object): # A dict of commands to methods that may call them. whitelisted_callers = { 'su': 'RunShellCommandWithSU', + 'getprop': 'ProvisionDevices', } - base_command = shlex.split(command)[0] + base_command = shlex.split(command)[0].strip(';') if (base_command in preferred_apis and (base_command not in whitelisted_callers or whitelisted_callers[base_command] not in [ @@ -1104,28 +1107,58 @@ class AndroidCommands(object): return self.RunShellCommand('su -c %s' % command, timeout_time, log_result) def CanAccessProtectedFileContents(self): - """Returns True if Get/SetProtectedFileContents would work via "su". + """Returns True if Get/SetProtectedFileContents would work via "su" or adb + shell running as root. Devices running user builds don't have adb root, but may provide "su" which can be used for accessing protected files. """ - r = self.RunShellCommandWithSU('cat /dev/null') - return r == [] or r[0].strip() == '' + return (self._GetProtectedFileCommandRunner() != None) + + def _GetProtectedFileCommandRunner(self): + """Finds the best method to access protected files on the device. + + Returns: + 1. None when privileged files cannot be accessed on the device. + 2. Otherwise: A function taking a single parameter: a string with command + line arguments. Running that function executes the command with + the appropriate method. + """ + if self._protected_file_access_method_initialized: + return self._privileged_command_runner + + self._privileged_command_runner = None + self._protected_file_access_method_initialized = True + + for cmd in [self.RunShellCommand, self.RunShellCommandWithSU]: + # Get contents of the auxv vector for the init(8) process from a small + # binary file that always exists on linux and is always read-protected. + contents = cmd('cat /proc/1/auxv') + # The leading 4 or 8-bytes of auxv vector is a_type. There are not many + # reserved a_type values, hence byte 2 must always be '\0' for a realistic + # auxv. See /usr/include/elf.h. + if len(contents) > 0 and (contents[0][2] == '\0'): + self._privileged_command_runner = cmd + break + return self._privileged_command_runner def GetProtectedFileContents(self, filename): """Gets contents from the protected file specified by |filename|. - This is less efficient than GetFileContents, but will work for protected - files and device files. + This is potentially less efficient than GetFileContents. """ - # Run the script as root - return self.RunShellCommandWithSU('cat "%s" 2> /dev/null' % filename) + command = 'cat "%s" 2> /dev/null' % filename + command_runner = self._GetProtectedFileCommandRunner() + if command_runner: + return command_runner(command) + else: + logging.warning('Could not access protected file: %s' % filename) + return [] def SetProtectedFileContents(self, filename, contents): """Writes |contents| to the protected file specified by |filename|. - This is less efficient than SetFileContents, but will work for protected - files and device files. + This is less efficient than SetFileContents. """ temp_file = self._GetDeviceTempFileName(AndroidCommands._TEMP_FILE_BASE_FMT) temp_script = self._GetDeviceTempFileName( @@ -1135,8 +1168,14 @@ class AndroidCommands(object): self.SetFileContents(temp_file, contents) # Create a script to copy the file contents to its final destination self.SetFileContents(temp_script, 'cat %s > %s' % (temp_file, filename)) - # Run the script as root - self.RunShellCommandWithSU('sh %s' % temp_script) + + command = 'sh %s' % temp_script + command_runner = self._GetProtectedFileCommandRunner() + if command_runner: + return command_runner(command) + else: + logging.warning('Could not set contents of protected file: %s' % filename) + # And remove the temporary files self.RunShellCommand('rm ' + temp_file) self.RunShellCommand('rm ' + temp_script) diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py index b3642e2307..98c50a34da 100644 --- a/build/android/pylib/base/test_dispatcher.py +++ b/build/android/pylib/base/test_dispatcher.py @@ -217,7 +217,10 @@ def _SetUp(runner_factory, device, out_runners, threadsafe_counter): runner = runner_factory(device, index) runner.SetUp() out_runners.append(runner) - except adb_wrapper.DeviceUnreachableError as e: + except (adb_wrapper.DeviceUnreachableError, + # TODO(jbudorick) Remove this once the underlying implementations + # for the above are switched or wrapped. + android_commands.errors.DeviceUnresponsiveError) as e: logging.warning('Failed to create shard for %s: [%s]', device, e) @@ -259,7 +262,10 @@ def _RunAllTests(runners, test_collection_factory, num_retries, timeout=None, # Catch DeviceUnreachableErrors and set a warning exit code try: workers.JoinAll(watcher) - except adb_wrapper.DeviceUnreachableError as e: + except (adb_wrapper.DeviceUnreachableError, + # TODO(jbudorick) Remove this once the underlying implementations + # for the above are switched or wrapped. + android_commands.errors.DeviceUnresponsiveError) as e: logging.error(e) exit_code = constants.WARNING_EXIT_CODE @@ -365,5 +371,8 @@ def RunTests(tests, runner_factory, devices, shard=True, finally: try: _TearDownRunners(runners, setup_timeout) - except adb_wrapper.DeviceUnreachableError as e: + except (adb_wrapper.DeviceUnreachableError, + # TODO(jbudorick) Remove this once the underlying implementations + # for the above are switched or wrapped. + android_commands.errors.DeviceUnresponsiveError) as e: logging.warning('Device unresponsive during TearDown: [%s]', e) diff --git a/build/android/pylib/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py index 1726230c13..e1fe7b18b6 100644 --- a/build/android/pylib/chrome_test_server_spawner.py +++ b/build/android/pylib/chrome_test_server_spawner.py @@ -196,16 +196,12 @@ class TestServerThread(threading.Thread): # Pass the remaining arguments as-is. for key, values in args_copy.iteritems(): - is_path = key in ['data-dir', 'cert-and-key-file', 'ssl-client-ca'] if not isinstance(values, list): values = [values] for value in values: if value is None: self.command_line.append('--%s' % key) else: - # Arguments with file paths get mangled. - if is_path and not os.path.isabs(value): - value = os.path.join(constants.DIR_SOURCE_ROOT, value) self.command_line.append('--%s=%s' % (key, value)) def _CloseUnnecessaryFDsForTestServerProcess(self): @@ -231,8 +227,11 @@ class TestServerThread(threading.Thread): command = [os.path.join(command, 'net', 'tools', 'testserver', 'testserver.py')] + self.command_line logging.info('Running: %s', command) + # Pass DIR_SOURCE_ROOT as the child's working directory so that relative + # paths in the arguments are resolved correctly. self.process = subprocess.Popen( - command, preexec_fn=self._CloseUnnecessaryFDsForTestServerProcess) + command, preexec_fn=self._CloseUnnecessaryFDsForTestServerProcess, + cwd=constants.DIR_SOURCE_ROOT) if self.process: if self.pipe_out: self.is_ready = self._WaitToStartAndGetPortFromTestServer() diff --git a/build/android/pylib/device_settings.py b/build/android/pylib/device_settings.py index 9f818d8b8f..a2db68c242 100644 --- a/build/android/pylib/device_settings.py +++ b/build/android/pylib/device_settings.py @@ -46,20 +46,34 @@ def ConfigureContentSettingsDict(device, desired_settings): DETERMINISTIC_DEVICE_SETTINGS = { 'com.google.settings/partner': { + 'network_location_opt_in': 0, 'use_location_for_services': 1, }, 'settings/global': { + 'assisted_gps_enabled': 0, + # Disable "auto time" and "auto time zone" to avoid network-provided time # to overwrite the device's datetime and timezone synchronized from host # when running tests later. See b/6569849. 'auto_time': 0, 'auto_time_zone': 0, + 'development_settings_enabled': 1, + + # Flag for allowing ActivityManagerService to send ACTION_APP_ERROR intents + # on application crashes and ANRs. If this is disabled, the crash/ANR dialog + # will never display the "Report" button. + # Type: int ( 0 = disallow, 1 = allow ) + 'send_action_app_error': 0, + 'stay_on_while_plugged_in': 3, 'verifier_verify_adb_installs' : 0, }, 'settings/secure': { + 'allowed_geolocation_origins': + 'http://www.google.co.uk http://www.google.com', + # Ensure that we never get random dialogs like "Unfortunately the process # android.process.acore has stopped", which steal the focus, and make our # automation fail (because the dialog steals the focus then mistakenly @@ -92,5 +106,6 @@ DETERMINISTIC_DEVICE_SETTINGS = { NETWORK_DISABLED_SETTINGS = { 'settings/global': { 'airplane_mode_on': 1, + 'wifi_on': 0, }, } diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py index b37629a35a..3be22a1338 100644 --- a/build/android/pylib/instrumentation/test_runner.py +++ b/build/android/pylib/instrumentation/test_runner.py @@ -329,7 +329,10 @@ class TestRunner(base_test_runner.BaseTestRunner): return self.device.old_interface.RunInstrumentationTest( test, self.test_pkg.GetPackageName(), self._GetInstrumentationArgs(), timeout) - except adb_wrapper.CommandTimeoutError: + except (adb_wrapper.CommandTimeoutError, + # TODO(jbudorick) Remove this once the underlying implementations + # for the above are switched or wrapped. + android_commands.errors.WaitForResponseTimedOutError): logging.info('Ran the test with timeout of %ds.' % timeout) raise @@ -368,8 +371,10 @@ class TestRunner(base_test_runner.BaseTestRunner): # See ../../third_party/android/testrunner/adb_interface.py except (adb_wrapper.CommandTimeoutError, adb_wrapper.DeviceUnreachableError, - # TODO(jbudorick) Remove this once the underlying implementations + # TODO(jbudorick) Remove these once the underlying implementations # for the above are switched or wrapped. + android_commands.errors.WaitForResponseTimedOutError, + android_commands.errors.DeviceUnresponsiveError, android_commands.errors.InstrumentationError), e: if start_date_ms: duration_ms = int(time.time()) * 1000 - start_date_ms diff --git a/build/android/pylib/valgrind_tools.py b/build/android/pylib/valgrind_tools.py index 99c530d96a..22ac39b4ba 100644 --- a/build/android/pylib/valgrind_tools.py +++ b/build/android/pylib/valgrind_tools.py @@ -22,6 +22,7 @@ Call tool.CleanUpEnvironment(). """ # pylint: disable=R0201 +import glob import os.path import subprocess import sys @@ -103,12 +104,19 @@ class AddressSanitizerTool(BaseTool): # This is required because ASan is a compiler-based tool, and md5sum # includes instrumented code from base. device.old_interface.SetUtilWrapper(self.GetUtilWrapper()) + libs = glob.glob(os.path.join(DIR_SOURCE_ROOT, + 'third_party/llvm-build/Release+Asserts/', + 'lib/clang/*/lib/linux/', + 'libclang_rt.asan-arm-android.so')) + assert len(libs) == 1 + self._lib = libs[0] def CopyFiles(self): """Copies ASan tools to the device.""" subprocess.call([os.path.join(DIR_SOURCE_ROOT, 'tools/android/asan/asan_device_setup.sh'), '--device', self._device.old_interface.GetDevice(), + '--lib', self._lib, '--extra-options', AddressSanitizerTool.EXTRA_OPTIONS]) self._device.old_interface.WaitForDevicePm() diff --git a/build/build_config.h b/build/build_config.h index 57eb9a8cc2..c384347bcf 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -139,12 +139,6 @@ #error Please add support for your compiler in build/build_config.h #endif -#if defined(__ARMEL__) && !defined(OS_IOS) -#define WCHAR_T_IS_UNSIGNED 1 -#elif defined(__MIPSEL__) -#define WCHAR_T_IS_UNSIGNED 0 -#endif - #if defined(OS_ANDROID) // The compiler thinks std::string::const_iterator and "const char*" are // equivalent types. diff --git a/build/common.gypi b/build/common.gypi index 99d4100b3f..f49174bdf8 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -355,6 +355,10 @@ # controls coverage granularity (experimental). 'asan_coverage%': 0, + # Enable Chromium overrides of the default configurations for various + # dynamic tools (like ASan). + 'use_sanitizer_options%': 1, + # Enable building with SyzyAsan. # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo 'syzyasan%': 0, @@ -442,6 +446,14 @@ # be loaded at runtime. 'cld2_dynamic%': 0, + # Whether CLD2 is a component. Only evaluated if cld_version == 2 and + # cld2_dynamic == 1. + # 0: Not a component. If cld2_dynamic == 1, it is up to the distribution + # to ensure that the data file is provided if desired. + # 1: Componentized. CLD data should be obtained via the Component + # Updater. + 'cld2_is_component%': 0, + # Enable spell checker. 'enable_spellcheck%': 1, @@ -642,6 +654,7 @@ 'enable_google_now%': 0, 'cld_version%': 1, 'cld2_dynamic%': 0, + 'cld2_is_component%': 0, 'enable_spellcheck%': 0, 'enable_themes%': 0, 'remoting%': 0, @@ -725,8 +738,8 @@ # linux_use_bundled_gold: whether to use the gold linker binary checked # into third_party/binutils. Force this off via GYP_DEFINES when you # are using a custom toolchain and need to control -B in ldflags. - # Gold is not used for 32-bit linux builds as it runs out of address - # space. + # Do not use 32-bit gold on 32-bit hosts as it runs out address space + # for component=static_library builds. ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { 'linux_use_bundled_gold%': 1, }, { @@ -745,14 +758,24 @@ }], # linux_use_gold_flags: whether to use build flags that rely on gold. - # On by default for x64 Linux. Temporarily off for ChromeOS as - # it failed on a buildbot. - ['OS=="linux" and target_arch=="x64" and chromeos==0', { + # On by default for x64 Linux. + ['OS=="linux" and target_arch=="x64"', { 'linux_use_gold_flags%': 1, }, { 'linux_use_gold_flags%': 0, }], + # linux_use_debug_fission: whether to use split DWARF debug info + # files. This can reduce link time significantly, but is incompatible + # with some utilities such as icecc and ccache. Requires gold and + # gcc >= 4.8 or clang. + # http://gcc.gnu.org/wiki/DebugFission + ['OS=="linux" and target_arch=="x64"', { + 'linux_use_debug_fission%': 1, + }, { + 'linux_use_debug_fission%': 0, + }], + ['OS=="android" or OS=="ios"', { 'enable_captive_portal_detection%': 0, }, { @@ -979,6 +1002,7 @@ 'mac_want_real_dsym%': '<(mac_want_real_dsym)', 'asan%': '<(asan)', 'asan_coverage%': '<(asan_coverage)', + 'use_sanitizer_options%': '<(use_sanitizer_options)', 'syzyasan%': '<(syzyasan)', 'syzygy_optimize%': '<(syzygy_optimize)', 'lsan%': '<(lsan)', @@ -1001,6 +1025,7 @@ 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', 'linux_use_gold_flags%': '<(linux_use_gold_flags)', + 'linux_use_debug_fission%': '<(linux_use_debug_fission)', 'use_canvas_skia%': '<(use_canvas_skia)', 'test_isolation_mode%': '<(test_isolation_mode)', 'test_isolation_outdir%': '<(test_isolation_outdir)', @@ -1011,6 +1036,7 @@ 'cld_version%': '<(cld_version)', 'cld2_table_size%': '<(cld2_table_size)', 'cld2_dynamic%': '<(cld2_dynamic)', + 'cld2_is_component%': '<(cld2_is_component)', 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', 'disable_ftp_support%': '<(disable_ftp_support)', 'enable_task_manager%': '<(enable_task_manager)', @@ -1440,6 +1466,16 @@ # Omit unwind support in official release builds to save space. We # can use breakpad for these builds. 'release_unwind_tables%': 0, + + 'conditions': [ + # For official builds, use a 64-bit linker to avoid running out + # of address space. The buildbots should have a 64-bit kernel + # and a 64-bit libc installed. + ['host_arch=="ia32" and target_arch=="ia32"', { + 'linux_use_bundled_gold%': '1', + 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', + }], + ], }], ], }], # os_posix==1 and OS!="mac" and OS!="ios" @@ -1521,12 +1557,14 @@ 'android_app_abi%': 'x86', 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', + 'android_ndk_lib_dir%': 'usr/lib', 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', }], ['target_arch == "x64"', { 'android_app_abi%': 'x86_64', 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-x86_64/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-x86_64', + 'android_ndk_lib_dir%': 'usr/lib64', 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/x86_64-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport', }], @@ -1540,19 +1578,22 @@ ], 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', + 'android_ndk_lib_dir%': 'usr/lib', 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', }], ['target_arch == "arm64"', { 'android_app_abi%': 'arm64-v8a', 'android_gdbserver%': '<(android_ndk_experimental_root)/prebuilt/android-arm64/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_experimental_root)/platforms/android-20/arch-arm64', - 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/aarch64-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', + 'android_ndk_lib_dir%': 'usr/lib', + 'android_toolchain%': '<(android_ndk_experimental_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', 'android_stlport_root': '<(android_ndk_experimental_root)/sources/cxx-stl/stlport', }], ['target_arch == "mipsel"', { 'android_app_abi%': 'mips', 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', + 'android_ndk_lib_dir%': 'usr/lib', 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin', }], ], @@ -1567,7 +1608,7 @@ 'android_toolchain%': '<(android_toolchain)', 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', - 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', + 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', 'android_sdk_tools%': '<(android_sdk_tools)', 'android_sdk%': '<(android_sdk)', 'android_sdk_jar%': '<(android_sdk)/android.jar', @@ -2543,6 +2584,9 @@ ['cld2_dynamic!=0', { 'defines': ['CLD2_DYNAMIC_MODE=1'], }], + ['cld2_is_component!=0', { + 'defines': ['CLD2_IS_COMPONENT=1'], + }], ['enable_printing==1', { 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'], }], @@ -3195,9 +3239,10 @@ }, { 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], }], - # http://gcc.gnu.org/wiki/DebugFission - # Requires gold and gcc >= 4.8 or clang. - ['linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', { + # TODO(mostynb): shuffle clang/gcc_version/binutils_version + # definitions in to the right scope to use them when setting + # linux_use_debug_fission, so it can be used here alone. + ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', { 'cflags': ['-gsplit-dwarf'], 'ldflags': ['-Wl,--gdb-index'], }], @@ -3651,7 +3696,7 @@ ], # TODO(glider): enable the default options on other systems. 'conditions': [ - ['OS=="linux" and (chromeos==0 or target_arch!="ia32")', { + ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', { 'dependencies': [ '<(DEPTH)/base/base.gyp:sanitizer_options', ], @@ -3712,7 +3757,7 @@ 'cflags': [ '-fsanitize=thread', '-fPIC', - '-mllvm', '-tsan-blacklist=<(tsan_blacklist)', + '-fsanitize-blacklist=<(tsan_blacklist)', ], 'ldflags': [ '-fsanitize=thread', @@ -3790,16 +3835,14 @@ ['linux_dump_symbols==1', { 'cflags': [ '-g' ], 'conditions': [ - # TODO(thestig) We should not need to specify chromeos==0 here, - # but somehow ChromeOS uses gold despite linux_use_bundled_gold==0. - # http://crbug.com./360082 - ['linux_use_bundled_gold==0 and chromeos==0 and OS!="android"', { + ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', { 'target_conditions': [ ['_toolset=="target"', { 'ldflags': [ - # Workarounds for linker OOM. + # Attempt to use less memory to prevent the linker from + # running out of address space. Considering installing a + # 64-bit kernel and switching to a 64-bit linker. '-Wl,--no-keep-memory', - '-Wl,--reduce-memory-overheads', ], }], ], @@ -3886,7 +3929,10 @@ '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', ], }], - ['binutils_version>=224', { + # Some binutils 2.23 releases may or may not have new dtags enabled, + # but they are all compatible with --disable-new-dtags, + # because the new dynamic tags are not created by default. + ['binutils_version>=223', { # Newer binutils don't set DT_RPATH unless you disable "new" dtags # and the new DT_RUNPATH doesn't work without --no-as-needed flag. # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index f10fde79e6..f96bc73142 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -2,11 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -declare_args() { - # Indicates if the build should use the Chrome-specific plugins for enforcing - # coding guidelines, etc. Only used when compiling with Clang. - clang_use_chrome_plugins = true -} +import("clang.gni") config("find_bad_constructs") { if (clang_use_chrome_plugins) { diff --git a/build/config/clang/clang.gni b/build/config/clang/clang.gni new file mode 100644 index 0000000000..3b2d76fbe6 --- /dev/null +++ b/build/config/clang/clang.gni @@ -0,0 +1,9 @@ +# Copyright 2014 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. + +declare_args() { + # Indicates if the build should use the Chrome-specific plugins for enforcing + # coding guidelines, etc. Only used when compiling with Clang. + clang_use_chrome_plugins = is_clang +} diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh index a02b748bd4..2611869c11 100755 --- a/build/install-build-deps.sh +++ b/build/install-build-deps.sh @@ -94,7 +94,7 @@ fi chromeos_dev_list="libbluetooth-dev" # Packages needed for development -dev_list="apache2.2-bin bison curl dpkg-dev elfutils fakeroot flex +dev_list="apache2.2-bin bison curl dpkg-dev elfutils devscripts fakeroot flex fonts-thai-tlwg g++ git-core gperf language-pack-da language-pack-fr language-pack-he language-pack-zh-hant libapache2-mod-php5 libasound2-dev libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev @@ -106,7 +106,7 @@ dev_list="apache2.2-bin bison curl dpkg-dev elfutils fakeroot flex libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox patch perl php5-cgi pkg-config python python-cherrypy3 python-dev python-psutil rpm ruby subversion ttf-dejavu-core ttf-indic-fonts - ttf-kochi-gothic ttf-kochi-mincho wdiff xfonts-mathml + ttf-kochi-gothic ttf-kochi-mincho wdiff xfonts-mathml zip $chromeos_dev_list" # 64-bit systems need a minimum set of 32-bit compat packages for the pre-built diff --git a/build/ios/grit_whitelist.txt b/build/ios/grit_whitelist.txt index 9aa3106e7c..a9f660bb30 100644 --- a/build/ios/grit_whitelist.txt +++ b/build/ios/grit_whitelist.txt @@ -497,6 +497,8 @@ IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION IDS_FLAGS_ENABLE_SPDY4A2_NAME +IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION +IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION diff --git a/build/java_apk.gypi b/build/java_apk.gypi index 33ff35d3ff..57af7efad0 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -133,9 +133,9 @@ 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', }], ['is_test_apk == 0 and emma_coverage != 0', { - 'emma_instrument': 1, + 'emma_instrument%': 1, },{ - 'emma_instrument': 0, + 'emma_instrument%': 0, }], ], }, @@ -143,7 +143,7 @@ 'native_lib_version_name%': '', 'use_chromium_linker%' : 0, 'enable_chromium_linker_tests%': 0, - 'emma_instrument': '<(emma_instrument)', + 'emma_instrument%': '<(emma_instrument)', 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', 'extra_native_libs': [], @@ -654,8 +654,6 @@ 'conditions': [ ['emma_instrument != 0', { 'dex_no_locals': 1, - }], - ['emma_instrument != 0 and is_test_apk == 0', { 'dex_input_paths': [ '<(emma_device_jar)' ], }], ], diff --git a/build/linux/python_arch.sh b/build/linux/python_arch.sh deleted file mode 100755 index e0f63bc6b0..0000000000 --- a/build/linux/python_arch.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -# Copyright (c) 2011 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 figures out the architecture of the version of Python we are building -# pyautolib against. -# -# python_arch.sh /usr/lib/libpython2.5.so.1.0 -# python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0 -# - -file_out=$(file --dereference "$1") -# The POSIX spec says that `file` should not exit(1) if the file does not -# exist, so do our own -e check to catch things. -if [ $? -ne 0 ] || [ ! -e "$1" ] ; then - echo unknown - exit 0 -fi - -echo $file_out | grep -qs "ARM" -if [ $? -eq 0 ]; then - echo arm - exit 0 -fi - -echo $file_out | grep -qs "MIPS" -if [ $? -eq 0 ]; then - echo mipsel - exit 0 -fi - -echo $file_out | grep -qs "x86-64" -if [ $? -eq 0 ]; then - echo x64 - exit 0 -fi - -echo $file_out | grep -qs "Intel 80386" -if [ $? -eq 0 ]; then - echo ia32 - exit 0 -fi - -exit 1 diff --git a/build/mac/edit_xibs.sh b/build/mac/edit_xibs.sh index 82045910f2..b7b749e160 100755 --- a/build/mac/edit_xibs.sh +++ b/build/mac/edit_xibs.sh @@ -12,6 +12,8 @@ set -e RELSRC=$(dirname "$0")/../.. SRC=$(cd "$RELSRC" && pwd) -GYP_GENERATORS=xcode "$SRC/tools/gyp/gyp" "$SRC/chrome/chrome_nibs.gyp" +export PYTHONPATH="$PYTHONPATH:$SRC/build" +export GYP_GENERATORS=xcode +"$SRC/tools/gyp/gyp" -I"$SRC/build/common.gypi" "$SRC/chrome/chrome_nibs.gyp" echo "You can now edit XIB files in Xcode using:" echo " $SRC/chrome/chrome_nibs.xcodeproj" diff --git a/build/util/LASTCHANGE b/build/util/LASTCHANGE index 98924049a9..7eb6be5cf5 100644 --- a/build/util/LASTCHANGE +++ b/build/util/LASTCHANGE @@ -1 +1 @@ -LASTCHANGE=265802 +LASTCHANGE=267519 diff --git a/build/util/LASTCHANGE.blink b/build/util/LASTCHANGE.blink index 7a0adc597d..47cd938f46 100644 --- a/build/util/LASTCHANGE.blink +++ b/build/util/LASTCHANGE.blink @@ -1 +1 @@ -LASTCHANGE=172351 +LASTCHANGE=173042 diff --git a/build/whitespace_file.txt b/build/whitespace_file.txt index d04a4a027a..57d555cbc4 100644 --- a/build/whitespace_file.txt +++ b/build/whitespace_file.txt @@ -84,7 +84,7 @@ PEOPLE SAY "FAILURE IS NOT AN OPTION", BUT FAILURE IS ALWAYS AN OPTION. WHAT GOES UP MUST HAVE A NON-ZERO VELOCITY I can feel the heat closing in, feel them out there making their moves... -What could possibly go wrong? +What could possibly go wrong? We've already ate our cake. Hello from tutorial! |