...

Text file src/naclmake.bash

Documentation: Index

     1#!/usr/bin/env bash
     2# Copyright 2016 The Go Authors. All rights reserved.
     3# Use of this source code is governed by a BSD-style
     4# license that can be found in the LICENSE file.
     5
     6# naclmake.bash builds runs make.bash for nacl, but not does run any
     7# tests. This is used by the continuous build.
     8
     9# Assumes that sel_ldr binaries and go_nacl_$GOARCH_exec scripts are in $PATH;
    10# see ../misc/nacl/README.
    11
    12set -e
    13ulimit -c 0
    14
    15# guess GOARCH if not set
    16naclGOARCH=$GOARCH
    17if [ -z "$naclGOARCH" ]; then
    18	case "$(uname -m)" in
    19	x86_64)
    20		naclGOARCH=amd64p32
    21		;;
    22	armv7l) # NativeClient on ARM only supports ARMv7A.
    23		naclGOARCH=arm
    24		;;
    25	i?86)
    26		naclGOARCH=386
    27		;;
    28	esac
    29fi
    30
    31unset GOOS GOARCH
    32if [ ! -f make.bash ]; then
    33	echo 'nacltest.bash must be run from $GOROOT/src' 1>&2
    34	exit 1
    35fi
    36
    37# the builder might have set GOROOT_FINAL.
    38export GOROOT=$(pwd)/..
    39
    40# Build zip file embedded in package syscall.
    41echo "##### Building fake file system zip for nacl"
    42rm -f syscall/fstest_nacl.go
    43GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
    44gobin=$GOROOT_BOOTSTRAP/bin
    45GOROOT=$GOROOT_BOOTSTRAP $gobin/go run ../misc/nacl/mkzip.go -p syscall -r .. ../misc/nacl/testzip.proto syscall/fstest_nacl.go
    46
    47# Run standard build and tests.
    48GOOS=nacl GOARCH=$naclGOARCH ./make.bash "$@"

View as plain text