Chromium Code Reviews
DescriptionAdds new GN template go_binary
This template supports the building of a Go binary, as opposed to a Go Mojo application. It optionally supports
the Go binary linking against native code using cgo.
I plan to use this to build the new version of the Mojom compiler
which is written in Go. This application needs to link against
the Mojo Go bindings because it will serialize the compiler's
intermediate representation to a Mojo message. This means that I need to use cgo and depend on the target
//mojo/public/platform/native:system.
Here is what my invocation looks like:
go_binary("mojom_parser") {
sources = [
"parser_main.go",
]
inputs = [
"generated/mojom_files/mojom_files.mojom.go",
<some files elided from the list here>
"parser/parsing.go",
]
deps = [
"//mojo/public/platform/native:system",
]
}
R=rogulenko@google.com, rogulenko
Committed: https://chromium.googlesource.com/external/mojo/+/226dddda4534a249db0133e17c57a7d6a1639bc9
Patch Set 1 #
Total comments: 2
Patch Set 2 : Responds to code review. #Messages
Total messages: 8 (1 generated)
|