| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 3 # Copyright (c) 2011 The Native Client 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 set -o nounset | 7 set -o nounset |
| 8 set -o errexit | 8 set -o errexit |
| 9 | 9 |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 # Helper | 37 # Helper |
| 38 ###################################################################### | 38 ###################################################################### |
| 39 | 39 |
| 40 source ../../tools/llvm/common-tools.sh | 40 source ../../tools/llvm/common-tools.sh |
| 41 | 41 |
| 42 readonly TOOLCHAIN_DIR="$(GetAbsolutePath "../../toolchain")" | 42 readonly TOOLCHAIN_DIR="$(GetAbsolutePath "../../toolchain")" |
| 43 | 43 |
| 44 readonly ARM_TRUSTED_TC="${TOOLCHAIN_DIR}/linux_arm-trusted" | 44 readonly ARM_TRUSTED_TC="${TOOLCHAIN_DIR}/linux_arm-trusted" |
| 45 readonly QEMU_TOOL="${ARM_TRUSTED_TC}/qemu_tool.sh" | 45 readonly QEMU_TOOL="${ARM_TRUSTED_TC}/qemu_tool.sh" |
| 46 | 46 |
| 47 readonly PNACL_TC="${TOOLCHAIN_DIR}/linux_arm-untrusted" | 47 readonly PNACL_TC="${TOOLCHAIN_DIR}/pnacl_${BUILD_PLATFORM}_${BUILD_ARCH}" |
| 48 readonly NNACL_TC="${TOOLCHAIN_DIR}/${SCONS_BUILD_PLATFORM}_x86" | 48 readonly NNACL_TC="${TOOLCHAIN_DIR}/${SCONS_BUILD_PLATFORM}_x86" |
| 49 readonly RUNNABLE_LD_X8632="${NNACL_TC}/nacl/lib/runnable-ld.so" | 49 readonly RUNNABLE_LD_X8632="${NNACL_TC}/nacl/lib/runnable-ld.so" |
| 50 readonly RUNNABLE_LD_X8664="${NNACL_TC}/nacl64/lib/runnable-ld.so" | 50 readonly RUNNABLE_LD_X8664="${NNACL_TC}/nacl64/lib/runnable-ld.so" |
| 51 | 51 |
| 52 gnu_size() { | 52 gnu_size() { |
| 53 # If the PNaCl toolchain is installed, prefer to use its "size". | 53 # If the PNaCl toolchain is installed, prefer to use its "size". |
| 54 if [ -d "${PNACL_TC}" ] ; then | 54 if [ -d "${PNACL_TC}" ] ; then |
| 55 GNU_SIZE="${PNACL_TC}/bin/size" | 55 GNU_SIZE="${PNACL_TC}/bin/size" |
| 56 elif ${BUILD_PLATFORM_LINUX} ; then | 56 elif ${BUILD_PLATFORM_LINUX} ; then |
| 57 GNU_SIZE="size" | 57 GNU_SIZE="size" |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 | 684 |
| 685 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. | 685 [ $# = 0 ] && set -- help # Avoid reference to undefined $1. |
| 686 | 686 |
| 687 if [ "$(type -t $1)" != "function" ]; then | 687 if [ "$(type -t $1)" != "function" ]; then |
| 688 Usage | 688 Usage |
| 689 echo "ERROR: unknown mode '$1'." >&2 | 689 echo "ERROR: unknown mode '$1'." >&2 |
| 690 exit 1 | 690 exit 1 |
| 691 fi | 691 fi |
| 692 | 692 |
| 693 "$@" | 693 "$@" |
| OLD | NEW |