summaryrefslogtreecommitdiff
path: root/src/cmd/go/list.go
diff options
context:
space:
mode:
authorCarlos Castillo <cookieo9@gmail.com>2014-02-13 10:11:44 -0800
committerCarlos Castillo <cookieo9@gmail.com>2014-02-13 10:11:44 -0800
commite08f64f3a4142e6066b4b015d82744e0a9b030fd (patch)
treedb715e5e77ed6684fdd042f534b5f84e33c9ba32 /src/cmd/go/list.go
parent14bb8cf4fac319a53f92f2e907d1582e61ed4e36 (diff)
downloadgo-e08f64f3a4142e6066b4b015d82744e0a9b030fd.tar.gz
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 issue 6536. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://codereview.appspot.com/60590044 Committer: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/go/list.go')
-rw-r--r--src/cmd/go/list.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/go/list.go b/src/cmd/go/list.go
index f56ebed38..2cd8e5fa7 100644
--- a/src/cmd/go/list.go
+++ b/src/cmd/go/list.go
@@ -47,6 +47,7 @@ which calls strings.Join. The struct being passed to the template is:
IgnoredGoFiles []string // .go sources ignored due to build constraints
CFiles []string // .c source files
CXXFiles []string // .cc, .cxx and .cpp source files
+ MFiles []string // .m source files
HFiles []string // .h, .hh, .hpp and .hxx source files
SFiles []string // .s source files
SwigFiles []string // .swig files