Chromium Code Reviews| 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 #@ Untrusted Toolchain Manager | 6 #@ Untrusted Toolchain Manager |
| 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 28 matching lines...) Expand all Loading... | |
| 39 SetScriptPath "${PNACL_ROOT}/build.sh" | 39 SetScriptPath "${PNACL_ROOT}/build.sh" |
| 40 SetLogDirectory "${PNACL_ROOT}/build/log" | 40 SetLogDirectory "${PNACL_ROOT}/build/log" |
| 41 | 41 |
| 42 # For different levels of make parallelism change this in your env | 42 # For different levels of make parallelism change this in your env |
| 43 readonly PNACL_CONCURRENCY=${PNACL_CONCURRENCY:-8} | 43 readonly PNACL_CONCURRENCY=${PNACL_CONCURRENCY:-8} |
| 44 # If true, we are in the middle of a merge. Do not update the llvm branch | 44 # If true, we are in the middle of a merge. Do not update the llvm branch |
| 45 # (except for clang, which has no local mods). | 45 # (except for clang, which has no local mods). |
| 46 readonly PNACL_MERGE_TESTING=${PNACL_MERGE_TESTING:-false} | 46 readonly PNACL_MERGE_TESTING=${PNACL_MERGE_TESTING:-false} |
| 47 PNACL_PRUNE=${PNACL_PRUNE:-false} | 47 PNACL_PRUNE=${PNACL_PRUNE:-false} |
| 48 PNACL_BUILD_ARM=true | 48 PNACL_BUILD_ARM=true |
| 49 # PNACL_BUILD_MIPS=true | |
|
Nick Bray (chromium)
2012/04/27 19:41:33
Nit: I haven't ever looked at this script before,
| |
| 49 | 50 |
| 50 if ${BUILD_PLATFORM_MAC} || ${BUILD_PLATFORM_WIN}; then | 51 if ${BUILD_PLATFORM_MAC} || ${BUILD_PLATFORM_WIN}; then |
| 51 # We don't yet support building ARM tools for mac or windows. | 52 # We don't yet support building ARM and MIPS tools for mac or windows. |
| 52 PNACL_BUILD_ARM=false | 53 PNACL_BUILD_ARM=false |
| 54 PNACL_BUILD_MIPS=false | |
| 53 fi | 55 fi |
| 54 | 56 |
| 55 readonly SB_JIT=${SB_JIT:-false} | 57 readonly SB_JIT=${SB_JIT:-false} |
| 56 | 58 |
| 57 # TODO(pdox): Decide what the target should really permanently be | 59 # TODO(pdox): Decide what the target should really permanently be |
| 58 readonly CROSS_TARGET_ARM=arm-none-linux-gnueabi | 60 readonly CROSS_TARGET_ARM=arm-none-linux-gnueabi |
| 59 readonly BINUTILS_TARGET=pc-nacl | 61 readonly BINUTILS_TARGET=pc-nacl |
| 60 readonly REAL_CROSS_TARGET=le32-unknown-nacl | 62 readonly REAL_CROSS_TARGET=le32-unknown-nacl |
| 61 readonly NACL64_TARGET=x86_64-nacl | 63 readonly NACL64_TARGET=x86_64-nacl |
| 62 | 64 |
| (...skipping 1752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1815 sysinfo=0 \ | 1817 sysinfo=0 \ |
| 1816 arm-ncval-core | 1818 arm-ncval-core |
| 1817 rm -rf "${INSTALL_ROOT}/tools-x86" | 1819 rm -rf "${INSTALL_ROOT}/tools-x86" |
| 1818 mkdir "${INSTALL_ROOT}/tools-x86" | 1820 mkdir "${INSTALL_ROOT}/tools-x86" |
| 1819 cp ${SCONS_OUT}/opt-linux-x86-32-to-arm/obj/src/trusted/validator_arm/\ | 1821 cp ${SCONS_OUT}/opt-linux-x86-32-to-arm/obj/src/trusted/validator_arm/\ |
| 1820 arm-ncval-core ${INSTALL_ROOT}/tools-x86 | 1822 arm-ncval-core ${INSTALL_ROOT}/tools-x86 |
| 1821 spopd | 1823 spopd |
| 1822 else | 1824 else |
| 1823 StepBanner "MISC-ARM" "Skipping ARM validator (Not yet supported on Mac)" | 1825 StepBanner "MISC-ARM" "Skipping ARM validator (Not yet supported on Mac)" |
| 1824 fi | 1826 fi |
| 1827 | |
| 1828 if ${BUILD_PLATFORM_LINUX} ; then | |
| 1829 StepBanner "MISC-MIPS" "Building validator (MIPS32)" | |
| 1830 spushd "${NACL_ROOT}" | |
| 1831 RunWithLog mips_ncval_core \ | |
| 1832 ./scons MODE=opt-host \ | |
| 1833 targetplatform=mips32 \ | |
| 1834 sysinfo=0 \ | |
| 1835 mips-ncval-core | |
| 1836 cp scons-out/opt-linux-x86-32-to-mips32/obj/src/trusted/validator_mips/\ | |
| 1837 mips-ncval-core ${INSTALL_ROOT}/tools-x86/mips-ncval-core | |
| 1838 spopd | |
| 1839 else | |
| 1840 StepBanner "MISC-MIPS" "Skipping MIPS validator (Not yet supported on Mac)" | |
| 1841 fi | |
| 1825 } | 1842 } |
| 1826 | 1843 |
| 1827 ######################################################################### | 1844 ######################################################################### |
| 1828 # < LIBELF > | 1845 # < LIBELF > |
| 1829 ######################################################################### | 1846 ######################################################################### |
| 1830 #+ libelf-host - Build and install libelf (using the host CC) | 1847 #+ libelf-host - Build and install libelf (using the host CC) |
| 1831 libelf-host() { | 1848 libelf-host() { |
| 1832 StepBanner "LIBELF-HOST" "Building and installing libelf" | 1849 StepBanner "LIBELF-HOST" "Building and installing libelf" |
| 1833 | 1850 |
| 1834 local extra_headers=false | 1851 local extra_headers=false |
| (...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4020 #Usage | 4037 #Usage |
| 4021 echo "ERROR: unknown function '$1'." >&2 | 4038 echo "ERROR: unknown function '$1'." >&2 |
| 4022 echo "For help, try:" | 4039 echo "For help, try:" |
| 4023 echo " $0 help" | 4040 echo " $0 help" |
| 4024 exit 1 | 4041 exit 1 |
| 4025 fi | 4042 fi |
| 4026 | 4043 |
| 4027 hg-migrate | 4044 hg-migrate |
| 4028 | 4045 |
| 4029 "$@" | 4046 "$@" |
| OLD | NEW |