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, and it" |
| 110 echo "appears before other Java SDKs in your path." |
| 111 echo "Refer to the \"Install prerequisites\" section here:" |
| 112 echo "https://code.google.com/p/chromium/wiki/AndroidBuildInstructions" |
| 113 return 1 |
| 114 fi |
| 115 |
107 # Workaround for valgrind build | 116 # Workaround for valgrind build |
108 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then | 117 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then |
109 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 | 118 # 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\ | 119 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ |
111 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ | 120 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ |
112 release_optimize=1" | 121 release_optimize=1" |
113 fi | 122 fi |
114 | 123 |
115 # Source a bunch of helper functions | 124 # Source a bunch of helper functions |
116 . ${CHROME_SRC}/build/android/adb_device_functions.sh | 125 . ${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 | 138 # This is just a simple wrapper of gyp_chromium, please don't add anything |
130 # in this function. | 139 # in this function. |
131 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" | 140 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" |
132 ( | 141 ( |
133 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" | 142 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" |
134 ) | 143 ) |
135 } | 144 } |
136 | 145 |
137 # FLOCK needs to be null on system that has no flock | 146 # FLOCK needs to be null on system that has no flock |
138 which flock > /dev/null || export FLOCK= | 147 which flock > /dev/null || export FLOCK= |
OLD | NEW |