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

Side by Side Diff: pnacl/build.sh

Issue 583783002: Switch PNaCl lib, include, and translator directories for new layout (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: typo Created 6 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 | pnacl/driver/driver_env.py » ('j') | pnacl/driver/driver_env.py » ('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 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 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 #@ PNaCl toolchain build script 6 #@ PNaCl toolchain build script
7 #@------------------------------------------------------------------- 7 #@-------------------------------------------------------------------
8 #@ This script builds the ARM and PNaCl untrusted toolchains. 8 #@ This script builds the ARM and PNaCl untrusted toolchains.
9 #@ It MUST be run from the native_client/ directory. 9 #@ It MUST be run from the native_client/ directory.
10 ###################################################################### 10 ######################################################################
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 # PNaCl toolchain installation directories (absolute paths) 126 # PNaCl toolchain installation directories (absolute paths)
127 readonly INSTALL_ROOT="${TOOLCHAIN_BASE}/pnacl_newlib" 127 readonly INSTALL_ROOT="${TOOLCHAIN_BASE}/pnacl_newlib"
128 readonly INSTALL_BIN="${INSTALL_ROOT}/bin" 128 readonly INSTALL_BIN="${INSTALL_ROOT}/bin"
129 129
130 # Bitcode lib directories (including static bitcode libs) 130 # Bitcode lib directories (including static bitcode libs)
131 INSTALL_LIB="${INSTALL_ROOT}/lib" 131 INSTALL_LIB="${INSTALL_ROOT}/lib"
132 132
133 # Native nacl lib directories 133 # Native nacl lib directories
134 # The pattern `${INSTALL_LIB_NATIVE}${arch}' is used in many places. 134 # The pattern `${INSTALL_LIB_NATIVE}${arch}' is used in many places.
135 readonly INSTALL_LIB_NATIVE="${INSTALL_ROOT}/lib-" 135 readonly INSTALL_LIB_NATIVE="${INSTALL_ROOT}/translator/"
136 readonly INSTALL_LIB_ARM="${INSTALL_LIB_NATIVE}arm" 136 readonly INSTALL_LIB_ARM="${INSTALL_LIB_NATIVE}arm/lib"
137 readonly INSTALL_LIB_X8632="${INSTALL_LIB_NATIVE}x86-32" 137 readonly INSTALL_LIB_X8632="${INSTALL_LIB_NATIVE}x86-32/lib"
138 readonly INSTALL_LIB_X8664="${INSTALL_LIB_NATIVE}x86-64" 138 readonly INSTALL_LIB_X8664="${INSTALL_LIB_NATIVE}x86-64/lib"
139 readonly INSTALL_LIB_MIPS32="${INSTALL_LIB_NATIVE}mips32" 139 readonly INSTALL_LIB_MIPS32="${INSTALL_LIB_NATIVE}mips32/lib"
140 140
141 # PNaCl client-translators (sandboxed) binary locations 141 # PNaCl client-translators (sandboxed) binary locations
142 readonly INSTALL_TRANSLATOR="${TOOLCHAIN_BASE}/pnacl_translator" 142 readonly INSTALL_TRANSLATOR="${TOOLCHAIN_BASE}/pnacl_translator"
143 143
144 144
145 # The INSTALL_HOST directory has host binaries and libs which 145 # The INSTALL_HOST directory has host binaries and libs which
146 # are part of the toolchain (e.g. llvm and binutils). 146 # are part of the toolchain (e.g. llvm and binutils).
147 # There are also tools-x86 and tools-arm which have host binaries which 147 # There are also tools-x86 and tools-arm which have host binaries which
148 # are not part of the toolchain but might be useful in the SDK, e.g. 148 # are not part of the toolchain but might be useful in the SDK, e.g.
149 # arm sel_ldr and x86-hosted arm/mips validators. 149 # arm sel_ldr and x86-hosted arm/mips validators.
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 llvm-sb universal 551 llvm-sb universal
552 binutils-gold-sb universal 552 binutils-gold-sb universal
553 if ${PNACL_PRUNE}; then 553 if ${PNACL_PRUNE}; then
554 # The universal pexes have already been translated. 554 # The universal pexes have already been translated.
555 # They don't need to stick around. 555 # They don't need to stick around.
556 rm -rf "$(GetTranslatorInstallDir universal)" 556 rm -rf "$(GetTranslatorInstallDir universal)"
557 fi 557 fi
558 fi 558 fi
559 559
560 # Copy native libs to translator install dir. 560 # Copy native libs to translator install dir.
561 cp -a ${INSTALL_LIB_NATIVE}* ${INSTALL_TRANSLATOR} 561 mkdir -p ${INSTALL_TRANSLATOR}/translator
562 cp -a ${INSTALL_LIB_NATIVE}* ${INSTALL_TRANSLATOR}/translator
562 563
563 driver-install-translator 564 driver-install-translator
564 565
565 if ${PNACL_PRUNE}; then 566 if ${PNACL_PRUNE}; then
566 sdk-clean newlib 567 sdk-clean newlib
567 fi 568 fi
568 } 569 }
569 570
570 571
571 #+ translator-prune Remove leftover files like pexes from pnacl_translator 572 #+ translator-prune Remove leftover files like pexes from pnacl_translator
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 fi 1980 fi
1980 done 1981 done
1981 } 1982 }
1982 1983
1983 GetTranslatorBuildDir() { 1984 GetTranslatorBuildDir() {
1984 local arch="$1" 1985 local arch="$1"
1985 echo "${TC_BUILD}/translator-${arch//_/-}" 1986 echo "${TC_BUILD}/translator-${arch//_/-}"
1986 } 1987 }
1987 1988
1988 GetTranslatorInstallDir() { 1989 GetTranslatorInstallDir() {
1989 local arch="$1" 1990 case $1 in
jvoung (off chromium) 2014/09/19 16:29:02 local arch?
Derek Schuff 2014/09/19 16:39:48 Done.
1990 echo "${INSTALL_TRANSLATOR}"/${arch} 1991 i686) arch=x86-32 ;;
1992 x86_64) arch=x86-64 ;;
1993 armv7) arch=arm ;;
1994 default) arch=$1 ;;
1995 esac
1996 echo "${INSTALL_TRANSLATOR}"/translator/${arch}
1991 } 1997 }
1992 1998
1993 ### Sandboxed version of gold. 1999 ### Sandboxed version of gold.
1994 2000
1995 #+------------------------------------------------------------------------- 2001 #+-------------------------------------------------------------------------
1996 #+ binutils-gold-sb - Build and install gold (sandboxed) 2002 #+ binutils-gold-sb - Build and install gold (sandboxed)
1997 #+ This is the replacement for the old 2003 #+ This is the replacement for the old
1998 #+ final sandboxed linker which was bfd based. 2004 #+ final sandboxed linker which was bfd based.
1999 #+ It has nothing to do with the bitcode linker 2005 #+ It has nothing to do with the bitcode linker
2000 #+ which is also gold based. 2006 #+ which is also gold based.
(...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
3368 3374
3369 if [ "$(type -t $1)" != "function" ]; then 3375 if [ "$(type -t $1)" != "function" ]; then
3370 #Usage 3376 #Usage
3371 echo "ERROR: unknown function '$1'." >&2 3377 echo "ERROR: unknown function '$1'." >&2
3372 echo "For help, try:" 3378 echo "For help, try:"
3373 echo " $0 help" 3379 echo " $0 help"
3374 exit 1 3380 exit 1
3375 fi 3381 fi
3376 3382
3377 "$@" 3383 "$@"
OLDNEW
« no previous file with comments | « no previous file | pnacl/driver/driver_env.py » ('j') | pnacl/driver/driver_env.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698