Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: build/android/envsetup_functions.sh

Issue 136073002: android: Set gcc_version in build/common.gypi instead of in envsetup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gn Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | build/common.gypi » ('j') | build/common.gypi » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Defines functions for envsetup.sh which sets up environment for building 7 # Defines functions for envsetup.sh which sets up environment for building
8 # Chromium on Android. The build can be either use the Android NDK/SDK or 8 # Chromium on Android. The build can be either use the Android NDK/SDK or
9 # android source tree. Each has a unique init function which calls functions 9 # android source tree. Each has a unique init function which calls functions
10 # prefixed with "common_" that is common for both environment setups. 10 # prefixed with "common_" that is common for both environment setups.
(...skipping 26 matching lines...) Expand all
37 toolchain_arch="mipsel-linux-android" 37 toolchain_arch="mipsel-linux-android"
38 ;; 38 ;;
39 *) 39 *)
40 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2 40 echo "TARGET_ARCH: ${TARGET_ARCH} is not supported." >& 2
41 print_usage 41 print_usage
42 return 1 42 return 1
43 ;; 43 ;;
44 esac 44 esac
45 45
46 toolchain_version="4.6" 46 toolchain_version="4.6"
47 # We directly set the gcc_version since we know what we use, and it should
48 # be set to xx instead of x.x. Refer the output of compiler_version.py.
49 gcc_version="46"
50 toolchain_target=$(basename \ 47 toolchain_target=$(basename \
51 ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-${toolchain_version}) 48 ${ANDROID_NDK_ROOT}/toolchains/${toolchain_arch}-${toolchain_version})
52 toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_target}"\ 49 toolchain_path="${ANDROID_NDK_ROOT}/toolchains/${toolchain_target}"\
53 "/prebuilt/${toolchain_dir}/bin/" 50 "/prebuilt/${toolchain_dir}/bin/"
54 51
55 # Set only if not already set. 52 # Set only if not already set.
56 # Don't override ANDROID_TOOLCHAIN if set by Android configuration env. 53 # Don't override ANDROID_TOOLCHAIN if set by Android configuration env.
57 export ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN:-${toolchain_path}} 54 export ANDROID_TOOLCHAIN=${ANDROID_TOOLCHAIN:-${toolchain_path}}
58 55
59 common_check_toolchain 56 common_check_toolchain
(...skipping 19 matching lines...) Expand all
79 export PATH=$PATH:${CHROME_SRC}/build/android 76 export PATH=$PATH:${CHROME_SRC}/build/android
80 77
81 # TODO(beverloo): Remove these once all consumers updated to --strip-binary. 78 # TODO(beverloo): Remove these once all consumers updated to --strip-binary.
82 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy) 79 export OBJCOPY=$(echo ${ANDROID_TOOLCHAIN}/*-objcopy)
83 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip) 80 export STRIP=$(echo ${ANDROID_TOOLCHAIN}/*-strip)
84 81
85 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories 82 # The set of GYP_DEFINES to pass to gyp. Use 'readlink -e' on directories
86 # to canonicalize them (remove double '/', remove trailing '/', etc). 83 # to canonicalize them (remove double '/', remove trailing '/', etc).
87 DEFINES="OS=android" 84 DEFINES="OS=android"
88 DEFINES+=" host_os=${host_os}" 85 DEFINES+=" host_os=${host_os}"
89 DEFINES+=" gcc_version=${gcc_version}"
90 86
91 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then 87 if [[ -n "$CHROME_ANDROID_OFFICIAL_BUILD" ]]; then
92 DEFINES+=" branding=Chrome" 88 DEFINES+=" branding=Chrome"
93 DEFINES+=" buildtype=Official" 89 DEFINES+=" buildtype=Official"
94 90
95 # These defines are used by various chrome build scripts to tag the binary's 91 # These defines are used by various chrome build scripts to tag the binary's
96 # version string as 'official' in linux builds (e.g. in 92 # version string as 'official' in linux builds (e.g. in
97 # chrome/trunk/src/chrome/tools/build/version.py). 93 # chrome/trunk/src/chrome/tools/build/version.py).
98 export OFFICIAL_BUILD=1 94 export OFFICIAL_BUILD=1
99 export CHROMIUM_BUILD="_google_chrome" 95 export CHROMIUM_BUILD="_google_chrome"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 fi 313 fi
318 export GYP_DEFINES="${DEFINES}" 314 export GYP_DEFINES="${DEFINES}"
319 315
320 export GYP_GENERATORS="android" 316 export GYP_GENERATORS="android"
321 317
322 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" 318 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All"
323 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" 319 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1"
324 320
325 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" 321 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp"
326 } 322 }
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | build/common.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698