This breaks our dependency on the x/tools repository, which has a tendency to change in unexpected ways. It also means we can use the version of go/types that ships with Go 1.5. Along the way, it appears that cgo processing has changed slightly. The old check for cgo files apparently wasn't working, so I removed it. Change-Id: I14378e9df9cd65c5ab61b47728ba0d56f31cdf76 Reviewed-on: https://go-review.googlesource.com/12680 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
22 lines
496 B
Bash
Executable File
22 lines
496 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2015 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
# Run this script to obtain an up-to-date vendored version of go/loader.
|
|
|
|
set -e
|
|
|
|
if [ ! -f vendor.bash ]; then
|
|
echo 'vendor.bash must be run from the loader directory' 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
rm -f *.go
|
|
for f in cgo.go loader.go util.go; do
|
|
cp $GOPATH/src/golang.org/x/tools/go/loader/$f .
|
|
done
|
|
|
|
patch -p1 < vendor.patch
|