OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Sets up environment for building Chromium on Android. It can either be | 5 # Sets up environment for building Chromium on Android. It can either be |
6 # compiled with the Android tree or using the Android SDK/NDK. To build with | 6 # compiled with the Android tree or using the Android SDK/NDK. To build with |
7 # NDK/SDK: ". build/android/envsetup.sh". Environment variable | 7 # NDK/SDK: ". build/android/envsetup.sh". Environment variable |
8 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to | 8 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to |
9 # specifiy build type. | 9 # specifiy build type. |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 echo "Please cd to the root of your Android tree and do: " | 97 echo "Please cd to the root of your Android tree and do: " |
98 echo " . build/envsetup.sh" | 98 echo " . build/envsetup.sh" |
99 echo " lunch" | 99 echo " lunch" |
100 echo "Then try this again." | 100 echo "Then try this again." |
101 echo "Or did you mean NDK/SDK build. Run envsetup.sh without any arguments." | 101 echo "Or did you mean NDK/SDK build. Run envsetup.sh without any arguments." |
102 return 1 | 102 return 1 |
103 elif [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then | 103 elif [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then |
104 webview_build_init | 104 webview_build_init |
105 fi | 105 fi |
106 | 106 |
107 java -version 2>&1 | grep -qs "Java HotSpot" | |
108 if [ $? -ne 0 ]; then | |
109 echo "Please check and make sure you are using the Oracle Java SDK" | |
Yaron
2013/02/12 18:50:35
Can you add a few more lines about how to verify a
Lei Zhang
2013/02/12 18:58:01
Done. I edited the wiki too.
| |
110 return 1 | |
111 fi | |
112 | |
107 # Workaround for valgrind build | 113 # Workaround for valgrind build |
108 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then | 114 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then |
109 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 | 115 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 |
110 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ | 116 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ |
111 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ | 117 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ |
112 release_optimize=1" | 118 release_optimize=1" |
113 fi | 119 fi |
114 | 120 |
115 # Source a bunch of helper functions | 121 # Source a bunch of helper functions |
116 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 122 . ${CHROME_SRC}/build/android/adb_device_functions.sh |
(...skipping 12 matching lines...) Expand all Loading... | |
129 # This is just a simple wrapper of gyp_chromium, please don't add anything | 135 # This is just a simple wrapper of gyp_chromium, please don't add anything |
130 # in this function. | 136 # in this function. |
131 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 137 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
132 ( | 138 ( |
133 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 139 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
134 ) | 140 ) |
135 } | 141 } |
136 | 142 |
137 # FLOCK needs to be null on system that has no flock | 143 # FLOCK needs to be null on system that has no flock |
138 which flock > /dev/null || export FLOCK= | 144 which flock > /dev/null || export FLOCK= |
OLD | NEW |