| OLD | NEW |
| 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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 local tools="pnacl-llc" | 409 local tools="pnacl-llc" |
| 410 if [[ "${arch}" == "i686" ]]; then | 410 if [[ "${arch}" == "i686" ]]; then |
| 411 tools+=" pnacl-sz" | 411 tools+=" pnacl-sz" |
| 412 fi | 412 fi |
| 413 for toolname in ${tools}; do | 413 for toolname in ${tools}; do |
| 414 cp -f "${objdir}"/Release*/bin/${toolname} . | 414 cp -f "${objdir}"/Release*/bin/${toolname} . |
| 415 mv -f ${toolname} ${toolname}.pexe | 415 mv -f ${toolname} ${toolname}.pexe |
| 416 local arches=${arch} | 416 local arches=${arch} |
| 417 if [[ "${arch}" == "universal" ]]; then | 417 if [[ "${arch}" == "universal" ]]; then |
| 418 arches="${SBTC_ARCHES_ALL}" | 418 arches="${SBTC_ARCHES_ALL}" |
| 419 elif [[ "${arch}" == "i686" && "${toolname}" == "pnacl-llc" ]]; then | 419 elif [[ "${arch}" == "i686" ]]; then |
| 420 # LLVM does not separate the i686 and x86_64 backends. | 420 # LLVM does not separate the i686 and x86_64 backends. |
| 421 # Translate twice to get both nexes, but only for pnacl-llc. | 421 # Translate twice to get both nexes. |
| 422 # We do not yet have an x86-64 backend for pnacl-sz. | |
| 423 arches="i686 x86_64" | 422 arches="i686 x86_64" |
| 424 fi | 423 fi |
| 425 if [[ "${arch}" == "i686" ]]; then | 424 if [[ "${arch}" == "i686" ]]; then |
| 426 arches+=" x86-32-nonsfi" | 425 arches+=" x86-32-nonsfi" |
| 427 elif [[ "${arch}" == "armv7" ]]; then | 426 elif [[ "${arch}" == "armv7" ]]; then |
| 428 arches+=" arm-nonsfi" | 427 arches+=" arm-nonsfi" |
| 429 fi | 428 fi |
| 430 translate-sb-tool ${toolname} "${arches}" | 429 translate-sb-tool ${toolname} "${arches}" |
| 431 install-sb-tool ${toolname} "${arches}" | 430 install-sb-tool ${toolname} "${arches}" |
| 432 done | 431 done |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 | 1032 |
| 1034 if [ "$(type -t $1)" != "function" ]; then | 1033 if [ "$(type -t $1)" != "function" ]; then |
| 1035 #Usage | 1034 #Usage |
| 1036 echo "ERROR: unknown function '$1'." >&2 | 1035 echo "ERROR: unknown function '$1'." >&2 |
| 1037 echo "For help, try:" | 1036 echo "For help, try:" |
| 1038 echo " $0 help" | 1037 echo " $0 help" |
| 1039 exit 1 | 1038 exit 1 |
| 1040 fi | 1039 fi |
| 1041 | 1040 |
| 1042 "$@" | 1041 "$@" |
| OLD | NEW |