]> Cypherpunks repositories - gostls13.git/commit
build: add build comments to core packages
authorRuss Cox <rsc@golang.org>
Thu, 15 Sep 2011 20:48:57 +0000 (16:48 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 15 Sep 2011 20:48:57 +0000 (16:48 -0400)
commit2715956f137463c0466c221352e61860942c6bb3
tree4033a7d198447a90ef7d31c960125809b5aa288e
parentef32eaceef917880cf2235e1b3bf80d1b37a8d4a
build: add build comments to core packages

The go/build package already recognizes
system-specific file names like

        mycode_darwin.go
        mycode_darwin_386.go
        mycode_386.s

However, it is also common to write files that
apply to multiple architectures, so a recent CL added
to go/build the ability to process comments
listing a set of conditions for building.  For example:

        // +build darwin freebsd openbsd/386

says that this file should be compiled only on
OS X, FreeBSD, or 32-bit x86 OpenBSD systems.

These conventions are not yet documented
(hence this long CL description).

This CL adds build comments to the multi-system
files in the core library, a step toward making it
possible to use go/build to build them.

With this change go/build can handle crypto/rand,
exec, net, path/filepath, os/user, and time.

os and syscall need additional adjustments.

R=golang-dev, r, gri, r, gustavo
CC=golang-dev
https://golang.org/cl/5011046
45 files changed:
src/pkg/crypto/rand/rand_unix.go
src/pkg/exec/lp_unix.go
src/pkg/net/cgo_bsd.go
src/pkg/net/cgo_stub.go
src/pkg/net/cgo_unix.go
src/pkg/net/dnsclient_unix.go
src/pkg/net/dnsconfig.go
src/pkg/net/fd.go
src/pkg/net/file.go
src/pkg/net/interface_bsd.go
src/pkg/net/interface_stub.go
src/pkg/net/iprawsock_posix.go
src/pkg/net/ipsock_posix.go
src/pkg/net/lookup_unix.go
src/pkg/net/newpollserver.go
src/pkg/net/port.go
src/pkg/net/sendfile_stub.go
src/pkg/net/sock.go
src/pkg/net/sock_bsd.go
src/pkg/net/tcpsock_posix.go
src/pkg/net/udpsock_posix.go
src/pkg/net/unixsock_posix.go
src/pkg/os/dir_unix.go
src/pkg/os/env_unix.go
src/pkg/os/error_posix.go
src/pkg/os/exec_posix.go
src/pkg/os/exec_unix.go
src/pkg/os/file_posix.go
src/pkg/os/file_unix.go
src/pkg/os/path_unix.go
src/pkg/os/str.go
src/pkg/os/sys_bsd.go
src/pkg/os/user/lookup_stubs.go
src/pkg/os/user/lookup_unix.go
src/pkg/path/Makefile
src/pkg/path/filepath/path_unix.go
src/pkg/syscall/bpf_bsd.go
src/pkg/syscall/exec_unix.go
src/pkg/syscall/route_bsd.go
src/pkg/syscall/sockcmsg_unix.go
src/pkg/syscall/syscall_bsd.go
src/pkg/syscall/syscall_unix.go
src/pkg/time/sys_unix.go
src/pkg/time/zoneinfo_posix.go
src/pkg/time/zoneinfo_unix.go