]> Cypherpunks repositories - gostls13.git/commit
cmd/go, go/build: support .m files
authorCarlos Castillo <cookieo9@gmail.com>
Thu, 13 Feb 2014 18:11:44 +0000 (10:11 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 13 Feb 2014 18:11:44 +0000 (10:11 -0800)
commit7861cd6082993becfedeaab75567eaba0c9a03f8
treef46b040ee1c06065534ec5b66b7e61c9a9d9f2a9
parentfc8e77ca65ab7d4dfd6fd58ad67145f253aab829
cmd/go, go/build: support .m files

go/build is changed to list the .m files in a package, and match them for build constraints, adding them to a new field: Package.MFiles.

The go tool is changed to support building .m files and linking in the results during CGO and SWIG builds. This means packages that create a C interface to calls Objective-C code from go are now go-gettable without producing and distributing .syso files. This change is analogous to the one in Go 1.2 made to support C++ built code.

This change doesn't support .mm files (Objective C++).

Also added support for these MFiles to go list's -json mode.

Fixes #6536.

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/60590044
doc/go1.3.txt
src/cmd/go/build.go
src/cmd/go/doc.go
src/cmd/go/list.go
src/cmd/go/pkg.go
src/pkg/go/build/build.go