OLD | NEW |
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 export CHROMIUM_BUILD="_google_chrome" | 92 export CHROMIUM_BUILD="_google_chrome" |
93 export CHROME_BUILD_TYPE="_official" | 93 export CHROME_BUILD_TYPE="_official" |
94 fi | 94 fi |
95 | 95 |
96 # TODO(thakis), Jan 18 2014: Remove this after two weeks or so, after telling | 96 # TODO(thakis), Jan 18 2014: Remove this after two weeks or so, after telling |
97 # everyone to set use_goma in GYP_DEFINES instead of a GOMA_DIR env var. | 97 # everyone to set use_goma in GYP_DEFINES instead of a GOMA_DIR env var. |
98 if [[ -d $GOMA_DIR ]]; then | 98 if [[ -d $GOMA_DIR ]]; then |
99 DEFINES+=" use_goma=1 gomadir=$GOMA_DIR" | 99 DEFINES+=" use_goma=1 gomadir=$GOMA_DIR" |
100 fi | 100 fi |
101 | 101 |
102 # The order file specifies the order of symbols in the .text section of the | |
103 # shared library, libchromeview.so. The file is an order list of section | |
104 # names and the library is linked with option | |
105 # --section-ordering-file=<orderfile>. The order file is updated by profiling | |
106 # startup after compiling with the order_profiling=1 GYP_DEFINES flag. | |
107 ORDER_DEFINES="order_text_section=${CHROME_SRC}/orderfiles/orderfile.out" | |
108 | |
109 # The following defines will affect ARM code generation of both C/C++ compiler | 102 # The following defines will affect ARM code generation of both C/C++ compiler |
110 # and V8 mksnapshot. | 103 # and V8 mksnapshot. |
111 case "${TARGET_ARCH}" in | 104 case "${TARGET_ARCH}" in |
112 "arm") | 105 "arm") |
113 DEFINES+=" ${ORDER_DEFINES}" | |
114 DEFINES+=" target_arch=arm" | 106 DEFINES+=" target_arch=arm" |
115 ;; | 107 ;; |
116 "x86") | 108 "x86") |
117 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. | 109 # TODO(tedbo): The ia32 build fails on ffmpeg, so we disable it here. |
118 DEFINES+=" use_libffmpeg=0" | 110 DEFINES+=" use_libffmpeg=0" |
119 | 111 |
120 host_arch=$(uname -m | sed -e \ | 112 host_arch=$(uname -m | sed -e \ |
121 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') | 113 's/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/') |
122 DEFINES+=" host_arch=${host_arch}" | 114 DEFINES+=" host_arch=${host_arch}" |
123 DEFINES+=" target_arch=ia32" | 115 DEFINES+=" target_arch=ia32" |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 fi | 311 fi |
320 export GYP_DEFINES="${DEFINES}" | 312 export GYP_DEFINES="${DEFINES}" |
321 | 313 |
322 export GYP_GENERATORS="android" | 314 export GYP_GENERATORS="android" |
323 | 315 |
324 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" | 316 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} default_target=All" |
325 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" | 317 export GYP_GENERATOR_FLAGS="${GYP_GENERATOR_FLAGS} limit_to_target_all=1" |
326 | 318 |
327 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" | 319 export CHROMIUM_GYP_FILE="${CHROME_SRC}/android_webview/all_webview.gyp" |
328 } | 320 } |
OLD | NEW |