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

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

Issue 10918045: Fix Clang build on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | no next file » | no next file with comments »
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
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 export CC_target="${ANDROID_GOMA_WRAPPER} $(echo -n ${ANDROID_TOOLCHAIN}/*-gcc)" 98 export CC_target="${ANDROID_GOMA_WRAPPER} $(echo -n ${ANDROID_TOOLCHAIN}/*-gcc)"
99 export CXX_target="${ANDROID_GOMA_WRAPPER} \ 99 export CXX_target="${ANDROID_GOMA_WRAPPER} \
100 $(echo -n ${ANDROID_TOOLCHAIN}/*-g++)" 100 $(echo -n ${ANDROID_TOOLCHAIN}/*-g++)"
101 export LINK_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-gcc) 101 export LINK_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-gcc)
102 export AR_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-ar) 102 export AR_target=$(echo -n ${ANDROID_TOOLCHAIN}/*-ar)
103 103
104 # Performs a gyp_chromium run to convert gyp->Makefile for android code. 104 # Performs a gyp_chromium run to convert gyp->Makefile for android code.
105 android_gyp() { 105 android_gyp() {
106 echo "GYP_GENERATORS set to '$GYP_GENERATORS'" 106 echo "GYP_GENERATORS set to '$GYP_GENERATORS'"
107 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@" 107 # http://crbug.com/143889.
108 # In case we are doing a Clang build, we have to unset CC_target and
109 # CXX_target. Otherwise GYP ends up generating a gcc build (although we set
110 # 'clang' to 1). This behavior was introduced by
111 # 54d2f6fe6d8a7b9d9786bd1f8540df6b4f46b83f in GYP.
112 (
113 # Fork to avoid side effects on the user's environment variables.
114 if echo "$GYP_DEFINES" | grep -q clang; then
hans 2012/09/03 13:53:19 What if i have clang=0 in my GYP_DEFINES? This loo
Philippe 2012/09/03 14:02:29 Indeed. I guess you would be the first one to have
115 if echo "$CC_target" | grep -q gcc; then
116 unset AR_target
117 unset CC_target
118 unset CXX_target
119 fi
120 fi
121 "${CHROME_SRC}/build/gyp_chromium" --depth="${CHROME_SRC}" --check "$@"
122 )
108 } 123 }
109 124
110 # FLOCK needs to be null on system that has no flock 125 # FLOCK needs to be null on system that has no flock
111 which flock > /dev/null || export FLOCK= 126 which flock > /dev/null || export FLOCK=
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698