 Chromium Code Reviews
 Chromium Code Reviews Issue 222203005:
  envsetup: Remove host_arch bitness check, let android_gyp print that it's going away.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 222203005:
  envsetup: Remove host_arch bitness check, let android_gyp print that it's going away.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| 1 #!/bin/bash | 1 #!/bin/bash | 
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be | 
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. | 
| 5 | 5 | 
| 6 # Sets up environment for building Chromium on Android. | 6 # Sets up environment for building Chromium on Android. | 
| 7 | 7 | 
| 8 # Make sure we're being sourced (possibly by another script). Check for bash | 8 # Make sure we're being sourced (possibly by another script). Check for bash | 
| 9 # since zsh sets $0 when sourcing. | 9 # since zsh sets $0 when sourcing. | 
| 10 if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then | 10 if [[ -n "$BASH_VERSION" && "${BASH_SOURCE:-$0}" == "$0" ]]; then | 
| 11 echo "ERROR: envsetup must be sourced." | 11 echo "ERROR: envsetup must be sourced." | 
| 12 exit 1 | 12 exit 1 | 
| 13 fi | 13 fi | 
| 14 | 14 | 
| 15 SCRIPT_DIR="$(dirname "${BASH_SOURCE:-$0}")" | 15 SCRIPT_DIR="$(dirname "${BASH_SOURCE:-$0}")" | 
| 16 | 16 | 
| 17 # Get host architecture, and abort if it is 32-bit. | |
| 18 host_arch=$(uname -m) | |
| 19 case "${host_arch}" in | |
| 20 x86_64) # pass | |
| 21 ;; | |
| 22 i?86) | |
| 23 echo "ERROR: Android build requires a 64-bit host build machine." | |
| 24 return 1 | |
| 25 ;; | |
| 26 *) | |
| 27 echo "ERROR: Unsupported host architecture (${host_arch})." | |
| 28 echo "Try running this script on a Linux/x86_64 machine instead." | |
| 29 return 1 | |
| 30 esac | |
| 31 | |
| 32 CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")" | 17 CURRENT_DIR="$(readlink -f "${SCRIPT_DIR}/../../")" | 
| 33 if [[ -z "${CHROME_SRC}" ]]; then | 18 if [[ -z "${CHROME_SRC}" ]]; then | 
| 34 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. | 19 # If $CHROME_SRC was not set, assume current directory is CHROME_SRC. | 
| 35 export CHROME_SRC="${CURRENT_DIR}" | 20 export CHROME_SRC="${CURRENT_DIR}" | 
| 36 fi | 21 fi | 
| 37 | 22 | 
| 38 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then | 23 if [[ "${CURRENT_DIR/"${CHROME_SRC}"/}" == "${CURRENT_DIR}" ]]; then | 
| 39 # If current directory is not in $CHROME_SRC, it might be set for other | 24 # If current directory is not in $CHROME_SRC, it might be set for other | 
| 40 # source tree. If $CHROME_SRC was set correctly and we are in the correct | 25 # source tree. If $CHROME_SRC was set correctly and we are in the correct | 
| 41 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". | 26 # directory, "${CURRENT_DIR/"${CHROME_SRC}"/}" will be "". | 
| (...skipping 23 matching lines...) Expand all Loading... | |
| 65 | 50 | 
| 66 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then | 51 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then | 
| 67 # These defines are used by various chrome build scripts to tag the binary's | 52 # These defines are used by various chrome build scripts to tag the binary's | 
| 68 # version string as 'official' in linux builds (e.g. in | 53 # version string as 'official' in linux builds (e.g. in | 
| 69 # chrome/trunk/src/chrome/tools/build/version.py). | 54 # chrome/trunk/src/chrome/tools/build/version.py). | 
| 70 export OFFICIAL_BUILD=1 | 55 export OFFICIAL_BUILD=1 | 
| 71 export CHROMIUM_BUILD="_google_chrome" | 56 export CHROMIUM_BUILD="_google_chrome" | 
| 72 export CHROME_BUILD_TYPE="_official" | 57 export CHROME_BUILD_TYPE="_official" | 
| 73 fi | 58 fi | 
| 74 | 59 | 
| 75 # Performs a gyp_chromium run to convert gyp->Makefile for android code. | |
| 76 android_gyp() { | 60 android_gyp() { | 
| 77 # This is just a simple wrapper of gyp_chromium, please don't add anything | 61 echo "Please call build/gyp_chromium instead. android_gyp is going away." | 
| 
Yaron
2014/04/02 22:04:19
In another deprecation, a table is flipped: http:/
 | |
| 78 # in this function. | |
| 79 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 62 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 
| 80 } | 63 } | 
| OLD | NEW |