diff options
author | Iain Merrick <husky@google.com> | 2010-11-01 12:19:54 +0000 |
---|---|---|
committer | Iain Merrick <husky@google.com> | 2010-11-03 10:21:10 +0000 |
commit | 731df977c0511bca2206b5f333555b1205ff1f43 (patch) | |
tree | 0e750b949b3f00a1ac11fda25d3c2de512f2b465 /build | |
parent | 5add15e10e7bb80512f2c597ca57221314abe577 (diff) | |
download | external_chromium-731df977c0511bca2206b5f333555b1205ff1f43.zip external_chromium-731df977c0511bca2206b5f333555b1205ff1f43.tar.gz external_chromium-731df977c0511bca2206b5f333555b1205ff1f43.tar.bz2 |
Merge Chromium at r63472 : Initial merge by git.
Change-Id: Ifb9ee821af006a5f2211e81471be93ae440a1f5a
Diffstat (limited to 'build')
-rw-r--r-- | build/all.gyp | 3 | ||||
-rwxr-xr-x | build/build-bisect.py | 8 | ||||
-rw-r--r-- | build/build_config.h | 2 | ||||
-rw-r--r-- | build/common.gypi | 36 | ||||
-rwxr-xr-x | build/install-chroot.sh | 132 | ||||
-rw-r--r-- | build/linux/chrome_linux.croc | 4 | ||||
-rw-r--r-- | build/mac/chrome_mac.croc | 9 | ||||
-rw-r--r-- | build/util/lastchange.py | 28 | ||||
-rw-r--r-- | build/whitespace_file.txt | 3 | ||||
-rw-r--r-- | build/win/chrome_win.croc | 9 |
10 files changed, 188 insertions, 46 deletions
diff --git a/build/all.gyp b/build/all.gyp index 5348c74..26ded8e 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -1,4 +1,4 @@ -# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# 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. @@ -33,6 +33,7 @@ '../third_party/ffmpeg/ffmpeg.gyp:*', '../third_party/icu/icu.gyp:*', '../third_party/libjpeg/libjpeg.gyp:*', + '../third_party/libwebp/libwebp.gyp:*', '../third_party/libpng/libpng.gyp:*', '../third_party/libxml/libxml.gyp:*', '../third_party/libxslt/libxslt.gyp:*', diff --git a/build/build-bisect.py b/build/build-bisect.py index f44846a..84807bc 100755 --- a/build/build-bisect.py +++ b/build/build-bisect.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.5 +#!/usr/bin/python # 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. @@ -175,7 +175,9 @@ def AskIsGoodBuild(rev): def main(): usage = ('%prog [options] [-- chromium-options]\n' - 'Perform binary search on the snapshot builds.') + 'Perform binary search on the snapshot builds.\n' + '\n' + 'Tip: add "-- --no-first-run" to bypass the first run prompts.') parser = optparse.OptionParser(usage=usage) # Strangely, the default help output doesn't include the choice list. choices = ['mac', 'xp', 'linux', 'linux-64', 'linux-chromiumos'] @@ -193,6 +195,8 @@ def main(): (opts, args) = parser.parse_args() if opts.archive is None: + print 'Error: missing required parameter: --archive' + print parser.print_help() return 1 diff --git a/build/build_config.h b/build/build_config.h index 891ba87..21f9b3c 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -72,7 +72,7 @@ #endif // Use heapchecker. -#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_HEAPCHECKER) +#if defined(OS_LINUX) && !defined(NO_HEAPCHECKER) #define USE_HEAPCHECKER 1 #endif diff --git a/build/common.gypi b/build/common.gypi index 1665600..9f87a44 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -93,6 +93,14 @@ }, { 'use_gnome_keyring%': 1, }], + + # Set to 1 compile with -fPIC cflag on linux. This is a must for shared + # libraries on linux x86-64 and arm. + ['host_arch=="ia32"', { + 'linux_fpic%': 0, + }, { + 'linux_fpic%': 1, + }], ], 'host_arch%': '<(host_arch)', @@ -101,7 +109,7 @@ # building on. 'target_arch%': '<(host_arch)', - # Copy conditionally-set chromeos and touchui variables out one scope. + # Copy conditionally-set variables out one scope. 'chromeos%': '<(chromeos)', 'touchui%': '<(touchui)', @@ -114,10 +122,6 @@ # compilation. 'fastbuild%': 0, - # Set to 1 compile with -fPIC cflag on linux. This is a must for shared - # libraries on linux x86-64 and arm. - 'linux_fpic%': 0, - # Python version. 'python_ver%': '2.5', @@ -154,11 +158,11 @@ 'host_arch%': '<(host_arch)', 'toolkit_views%': '<(toolkit_views)', 'use_gnome_keyring%': '<(use_gnome_keyring)', + 'linux_fpic%': '<(linux_fpic)', 'chromeos%': '<(chromeos)', 'touchui%': '<(touchui)', 'inside_chromium_build%': '<(inside_chromium_build)', 'fastbuild%': '<(fastbuild)', - 'linux_fpic%': '<(linux_fpic)', 'python_ver%': '<(python_ver)', 'armv7%': '<(armv7)', 'arm_neon%': '<(arm_neon)', @@ -310,7 +314,7 @@ # whether to compile in the sources for the GPU plugin / process. 'enable_gpu%': 1, - # Use OpenSSL instead of NSS. Currently in developement. + # Use OpenSSL instead of NSS. Currently in development. 'use_openssl%': 0, 'conditions': [ @@ -497,6 +501,11 @@ 'ENABLE_GPU=1', ], }], + ['use_openssl==1', { + 'defines': [ + 'USE_OPENSSL=1', + ], + }], ['enable_eglimage==1', { 'defines': [ 'ENABLE_EGLIMAGE=1', @@ -982,6 +991,11 @@ '-Wl,--gc-sections', ], }], + ['clang==1', { + 'cflags!': [ + '-fno-ident', + ], + }], ] }, }, @@ -1134,6 +1148,10 @@ '-Wno-bool-conversions', # Don't die on dtoa code that uses a char as an array index. '-Wno-char-subscripts', + # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see + # http://code.google.com/p/googletest/source/detail?r=446 . + # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ). + '-Wno-unnamed-type-template-args', ], 'cflags!': [ # Clang doesn't seem to know know this flag. @@ -1242,6 +1260,10 @@ # Don't die on dtoa code that uses a char as an array index. # This is required solely for base/third_party/dmg_fp/dtoa.cc. '-Wno-char-subscripts', + # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see + # http://code.google.com/p/googletest/source/detail?r=446 . + # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ). + '-Wno-unnamed-type-template-args', ], }], ], diff --git a/build/install-chroot.sh b/build/install-chroot.sh index ad0dafa..b80aea0 100755 --- a/build/install-chroot.sh +++ b/build/install-chroot.sh @@ -10,6 +10,63 @@ # N. B. it is unlikely that this script will ever work on anything other than a # Debian-derived system. +usage() { + echo "usage: ${0##*/} [-m mirror] [-g group,...] [-s] [-c]" + echo "-g group,... groups that can use the chroot unauthenticated" + echo " Default: 'admin' and current user's group ('$(id -gn)')" + echo "-m mirror an alternate repository mirror for package downloads" + echo "-s configure default deb-srcs" + echo "-c always copy 64bit helper binaries to 32bit chroot" + echo "-h this help message" +} + +process_opts() { + local OPTNAME OPTIND OPTERR OPTARG + while getopts ":g:m:sch" OPTNAME; do + case "$OPTNAME" in + g) + [ -n "${OPTARG}" ] && + chroot_groups="${chroot_groups}${chroot_groups:+,}${OPTARG}" + ;; + m) + if [ -n "${mirror}" ]; then + echo "You can only specify exactly one mirror location" + usage + exit 1 + fi + mirror="$OPTARG" + ;; + s) + add_srcs="y" + ;; + c) + copy_64="y" + ;; + h) + usage + exit 0 + ;; + \:) + echo "'-$OPTARG' needs an argument." + usage + exit 1 + ;; + *) + echo "invalid command-line option: $OPTARG" + usage + exit 1 + ;; + esac + done + + if [ $# -ge ${OPTIND} ]; then + eval echo "Unexpected command line argument: \${${OPTIND}}" + usage + exit 1 + fi +} + + # Check that we are running as a regular user [ "$(id -nu)" = root ] && { echo "Run this script as a regular user and provide your \"sudo\"" \ @@ -18,6 +75,8 @@ } mkdir -p "$HOME/chroot/" +process_opts "$@" + # Error handler trap 'exit 1' INT TERM QUIT trap 'sudo apt-get clean; tput bel; echo; echo Failed' EXIT @@ -81,6 +140,25 @@ target="${distname}${arch}" } sudo mkdir -p /var/lib/chroot/"${target}" +# Offer to include additional standard repositories for Ubuntu-based chroots. +alt_repos= +grep ubuntu.com /usr/share/debootstrap/scripts/"${distname}" >&/dev/null && { + while :; do + echo "Would you like to add ${distname}-updates and ${distname}-security " + echo -n "to the chroot's sources.list (y/n)? " + read alt_repos + case "${alt_repos}" in + y|Y) + alt_repos="y" + break + ;; + n|N) + break + ;; + esac + done +} + # 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 @@ -92,15 +170,20 @@ 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" +if [ -z "${mirror}" ]; then + grep ubuntu.com /usr/share/debootstrap/scripts/"${distname}" >&/dev/null && + mirror="http://archive.ubuntu.com/ubuntu" || + mirror="http://ftp.us.debian.org/debian" +fi 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" +if [ -z "${chroot_groups}" ]; then + chroot_groups="admin,$(id -gn)" +fi sudo sh -c 'cat >>/etc/schroot/schroot.conf' <<EOF [${target%bit}] description=${brand} ${distname} ${arch} @@ -108,8 +191,8 @@ type=directory directory=/var/lib/chroot/${target} priority=3 users=root -groups=admin -root-groups=admin +groups=${chroot_groups} +root-groups=${chroot_groups} personality=linux$([ "${arch}" != 64bit ] && echo 32) script-config=script-${target} @@ -139,15 +222,28 @@ EOF sudo chown root:root /usr/local/bin/"${target%bit}" sudo chmod 755 /usr/local/bin/"${target%bit}" +# Add the standard Ubuntu update repositories if requested. +[ "${alt_repos}" = "y" -a \ + -r "/var/lib/chroot/${target}/etc/apt/sources.list" ] && +sudo sed -i '/^deb .* [^ -]\+ main$/p + s/^\(deb .* [^ -]\+\) main/\1-security main/ + p + t1 + d + :1;s/-security main/-updates main/ + t + d' "/var/lib/chroot/${target}/etc/apt/sources.list" + # Add a few more repositories to the chroot -[ -r /var/lib/chroot/${target}/etc/apt/sources.list ] && +[ "${add_srcs}" = "y" -a \ + -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 + d' "/var/lib/chroot/${target}/etc/apt/sources.list" # Update packages sudo schroot -c "${target%bit}" -p -- /bin/sh -c ' @@ -177,26 +273,34 @@ sudo schroot -c "${target%bit}" -p -- apt-get -y install \ 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 +# as 64bit. This is only done automatically if the chroot distro is the same as +# the host, otherwise there might be incompatibilities in build settings or +# runtime dependencies. The user can force it with the '-c' flag. +host_distro=$(grep DISTRIB_CODENAME /etc/lsb-release 2>/dev/null | \ + cut -d "=" -f 2) +if [ "${copy_64}" = "y" -o \ + "${host_distro}" = "${distname}" -a "${arch}" = 32bit ] && \ + file /bin/bash 2>/dev/null | grep -q x86-64; then + readlinepkg=$(sudo schroot -c "${target%bit}" -p -- sh -c \ + 'apt-cache search "lib64readline.\$" | sort | tail -n 1 | cut -d " " -f 1') sudo schroot -c "${target%bit}" -p -- apt-get -y install \ - lib64expat1 lib64ncurses5 lib64readline6 lib64z1 + lib64expat1 lib64ncurses5 ${readlinepkg} 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/ + 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/ + 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/ || : + sudo cp /usr/lib/$lib* "/var/lib/chroot/${target}/usr/lib64/" || : done fi diff --git a/build/linux/chrome_linux.croc b/build/linux/chrome_linux.croc index 4ce75e2..f400306 100644 --- a/build/linux/chrome_linux.croc +++ b/build/linux/chrome_linux.croc @@ -14,9 +14,9 @@ 'regexp' : '.*/(chromeos|views)/', 'include' : 0, }, - # Don't include windows or mac specific files + # Don't include chromeos, windows, or mac specific files { - 'regexp' : '.*(_|/)(mac|win|views)(\\.|_)', + 'regexp' : '.*(_|/)(chromeos|mac|win|views)(\\.|_)', 'include' : 0, }, diff --git a/build/mac/chrome_mac.croc b/build/mac/chrome_mac.croc index f202cb9..8cde00c 100644 --- a/build/mac/chrome_mac.croc +++ b/build/mac/chrome_mac.croc @@ -6,9 +6,14 @@ 'rules' : [ # Specify inclusions before exclusions, since rules are in order. - # Don't include linux or windows specific files + # Don't include chromeos, linux, or windows specific files { - 'regexp' : '.*(_|/)(linux|win|views)(\\.|_)', + 'regexp' : '.*(_|/)(chromeos|linux|win|views)(\\.|_)', + 'include' : 0, + }, + # Don't include ChromeOS dirs + { + 'regexp' : '.*/chromeos/', 'include' : 0, }, diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 8f1fb64..00b275f 100644 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# 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. @@ -43,21 +43,23 @@ def git_fetch_id(): Errors are swallowed. """ + git_re = re.compile('^\s*git-svn-id:\s+(\S+)@(\d+)', re.M) try: - p = subprocess.Popen(['git', 'log', '-1'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE, - shell=(sys.platform=='win32')) + proc = subprocess.Popen(['git', 'log', '-999'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=(sys.platform=='win32')) + for line in proc.stdout: + match = git_re.search(line) + if match: + id = match.group(2) + if id: + proc.stdout.close() # Cut pipe. + return id except OSError: # 'git' is apparently either not installed or not executable. - return None - id = None - if p: - git_re = re.compile('^\s*git-svn-id:\s+(\S+)@(\d+)', re.M) - m = git_re.search(p.stdout.read()) - if m: - id = m.group(2) - return id + pass + return None def fetch_change(default_lastchange): diff --git a/build/whitespace_file.txt b/build/whitespace_file.txt index aed7970..11fa622 100644 --- a/build/whitespace_file.txt +++ b/build/whitespace_file.txt @@ -5,5 +5,4 @@ found in the LICENSE file. This file is used for making non-code changes to trigger buildbot cycles. Make any modification below this line. ================================================================================ - -This file needs more cowbell. +
\ No newline at end of file diff --git a/build/win/chrome_win.croc b/build/win/chrome_win.croc index d4770d6..e1e3bb7 100644 --- a/build/win/chrome_win.croc +++ b/build/win/chrome_win.croc @@ -6,9 +6,14 @@ 'rules' : [ # Specify inclusions before exclusions, since rules are in order. - # Don't include posix or linux specific files + # Don't include chromeos, posix, or linux specific files { - 'regexp' : '.*(_|/)(linux|posix)(\\.|_)', + 'regexp' : '.*(_|/)(chromeos|linux|posix)(\\.|_)', + 'include' : 0, + }, + # Don't include ChromeOS dirs + { + 'regexp' : '.*/chromeos/', 'include' : 0, }, |