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

Side by Side Diff: build_tools/nacl_env.sh

Issue 22311014: Handle both old and new pnacl toolchain locations. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 4 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 # Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Echo the environment variables need to to build/configure standard 6 # Echo the environment variables need to to build/configure standard
7 # GNU make/automake/configure projects. 7 # GNU make/automake/configure projects.
8 # 8 #
9 # To import these variables into your environment do: 9 # To import these variables into your environment do:
10 # $ . nacl_env.sh 10 # $ . nacl_env.sh
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 for LA_FILE in ${LA_FILES}; do 141 for LA_FILE in ${LA_FILES}; do
142 mv ${LA_FILE} ${LA_FILE}.old 142 mv ${LA_FILE} ${LA_FILE}.old
143 done 143 done
144 fi 144 fi
145 145
146 NACL_SDK_LIBDIR="${NACL_SDK_ROOT}/lib/${NACL_LIBC}_${NACL_ARCH_ALT}/Release" 146 NACL_SDK_LIBDIR="${NACL_SDK_ROOT}/lib/${NACL_LIBC}_${NACL_ARCH_ALT}/Release"
147 } 147 }
148 148
149 149
150 InitializePNaClToolchain() { 150 InitializePNaClToolchain() {
151 local TC_ROOT=${NACL_SDK_ROOT}/toolchain/${OS_SUBDIR}_x86_pnacl/${NACL_LIBC} 151 local TC_ROOT=${NACL_SDK_ROOT}/toolchain
152 # The PNaCl toolchain moved in pepper_30. Check for
153 # the existence of the old folder first and use that
154 # if found.
155 if [ -d "${TC_ROOT}/${OS_SUBDIR}_x86_pnacl" ]; then
156 TC_ROOT=${TC_ROOT}/${OS_SUBDIR}_x86_pnacl/${NACL_LIBC}
157 else
158 TC_ROOT=${TC_ROOT}/${OS_SUBDIR}_pnacl
159 fi
152 readonly NACL_TOOLCHAIN_ROOT=${NACL_TOOLCHAIN_ROOT:-${TC_ROOT}} 160 readonly NACL_TOOLCHAIN_ROOT=${NACL_TOOLCHAIN_ROOT:-${TC_ROOT}}
153 readonly NACL_BIN_PATH=${NACL_TOOLCHAIN_ROOT}/bin 161 readonly NACL_BIN_PATH=${NACL_TOOLCHAIN_ROOT}/bin
154 162
155 # export nacl tools for direct use in patches. 163 # export nacl tools for direct use in patches.
156 export NACLCC=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-clang 164 export NACLCC=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-clang
157 export NACLCXX=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-clang++ 165 export NACLCXX=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-clang++
158 export NACLAR=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar 166 export NACLAR=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar
159 export NACLRANLIB=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib 167 export NACLRANLIB=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib
160 export NACLLD=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld 168 export NACLLD=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld
161 export NACLSTRINGS=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings 169 export NACLSTRINGS=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 export CXX=${NACLCXX} 209 export CXX=${NACLCXX}
202 export AR=${NACLAR} 210 export AR=${NACLAR}
203 export RANLIB=${NACLRANLIB} 211 export RANLIB=${NACLRANLIB}
204 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig 212 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig
205 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR} 213 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR}
206 export PATH=${PATH}:${NACL_BIN_PATH} 214 export PATH=${PATH}:${NACL_BIN_PATH}
207 export CFLAGS=${NACL_CFLAGS} 215 export CFLAGS=${NACL_CFLAGS}
208 exec $@ 216 exec $@
209 fi 217 fi
210 fi 218 fi
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