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

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

Issue 11026038: Android: fix webview-in-android build config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/android/envsetup_functions.sh » ('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 # Sets up environment for building Chromium on Android. It can either be 7 # Sets up environment for building Chromium on Android. It can either be
8 # compiled with the Android tree or using the Android SDK/NDK. To build with 8 # compiled with the Android tree or using the Android SDK/NDK. To build with
9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable 9 # NDK/SDK: ". build/android/envsetup.sh --sdk". Environment variable
10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to 10 # ANDROID_SDK_BUILD=1 will then be defined and used in the rest of the setup to
11 # specifiy build type. 11 # specifiy build type.
12 12
13 # When building WebView as part of Android we can't use the SDK. Other builds
14 # default to using the SDK.
13 # NOTE(yfriedman): This looks unnecessary but downstream the default value 15 # NOTE(yfriedman): This looks unnecessary but downstream the default value
14 # should be 0 until all builds switch to SDK/NDK. 16 # should be 0 until all builds switch to SDK/NDK.
15 export ANDROID_SDK_BUILD=1 17 if [[ "${CHROME_ANDROID_BUILD_WEBVIEW}" -eq 1 ]]; then
18 export ANDROID_SDK_BUILD=0
Yaron 2012/10/04 16:04:42 Hmm. So in theory, we plan to remove the SDK_BUILD
Torne 2012/10/04 16:10:33 Sure, we can just make the remaining things direct
19 else
20 export ANDROID_SDK_BUILD=1
21 fi
16 # Loop over args in case we add more arguments in the future. 22 # Loop over args in case we add more arguments in the future.
17 while [ "$1" != "" ]; do 23 while [ "$1" != "" ]; do
18 case $1 in 24 case $1 in
19 -s | --sdk ) export ANDROID_SDK_BUILD=1 ; shift ;; 25 -s | --sdk ) export ANDROID_SDK_BUILD=1 ; shift ;;
20 * ) shift ; break ;; 26 * ) shift ; break ;;
21 esac 27 esac
22 done 28 done
23 29
24 if [[ "${ANDROID_SDK_BUILD}" -eq 1 ]]; then 30 if [[ "${ANDROID_SDK_BUILD}" -eq 1 ]]; then
25 echo "Using SDK build" 31 echo "Using SDK build"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 elif [[ -z "$ANDROID_BUILD_TOP" || \ 74 elif [[ -z "$ANDROID_BUILD_TOP" || \
69 -z "$ANDROID_TOOLCHAIN" || \ 75 -z "$ANDROID_TOOLCHAIN" || \
70 -z "$ANDROID_PRODUCT_OUT" ]]; then 76 -z "$ANDROID_PRODUCT_OUT" ]]; then
71 echo "Android build environment variables must be set." 77 echo "Android build environment variables must be set."
72 echo "Please cd to the root of your Android tree and do: " 78 echo "Please cd to the root of your Android tree and do: "
73 echo " . build/envsetup.sh" 79 echo " . build/envsetup.sh"
74 echo " lunch" 80 echo " lunch"
75 echo "Then try this again." 81 echo "Then try this again."
76 echo "Or did you mean NDK/SDK build. Run envsetup.sh with --sdk argument." 82 echo "Or did you mean NDK/SDK build. Run envsetup.sh with --sdk argument."
77 return 1 83 return 1
84 elif [[ -n "$CHROME_ANDROID_BUILD_WEBVIEW" ]]; then
85 webview_build_init
78 else 86 else
79 non_sdk_build_init 87 non_sdk_build_init
80 fi 88 fi
81 89
82 # Workaround for valgrind build 90 # Workaround for valgrind build
83 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then 91 if [[ -n "$CHROME_ANDROID_VALGRIND_BUILD" ]]; then
84 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709 92 # arm_thumb=0 is a workaround for https://bugs.kde.org/show_bug.cgi?id=270709
85 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\ 93 DEFINES+=" arm_thumb=0 release_extra_cflags='-fno-inline\
86 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\ 94 -fno-omit-frame-pointer -fno-builtin' release_valgrind_build=1\
87 release_optimize=1" 95 release_optimize=1"
(...skipping 28 matching lines...) Expand all
116 if echo "$CXX_target" | grep -q g++; then 124 if echo "$CXX_target" | grep -q g++; then
117 unset CXX_target 125 unset CXX_target
118 fi 126 fi
119 fi 127 fi
120 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" 128 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@"
121 ) 129 )
122 } 130 }
123 131
124 # FLOCK needs to be null on system that has no flock 132 # FLOCK needs to be null on system that has no flock
125 which flock > /dev/null || export FLOCK= 133 which flock > /dev/null || export FLOCK=
OLDNEW
« no previous file with comments | « no previous file | build/android/envsetup_functions.sh » ('j') | build/common.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698