Documentation ¶
Overview ¶
Microfactory is a tool to incrementally compile a go program. It's similar to `go install`, but doesn't require a GOPATH. A package->path mapping can be specified as command line options:
-pkg-path android/soong=build/soong -pkg-path github.com/google/blueprint=build/blueprint
The paths can be relative to the current working directory, or an absolute path. Both packages and paths are compared with full directory names, so the android/soong-test package wouldn't be mapped in the above case.
Microfactory will ignore *_test.go files, and limits *_darwin.go and *_linux.go files to MacOS and Linux respectively. It does not support build tags or any other suffixes.
Builds are incremental by package. All input files are hashed, and if the hash of an input or dependency changes, the package is rebuilt.
It also exposes the -trimpath option from go's compiler so that embedded path names (such as in log.Llongfile) are relative paths instead of absolute paths.
If you don't have a previously built version of Microfactory, when used with -b <microfactory_bin_file>, Microfactory can rebuild itself as necessary. Combined with a shell script like microfactory.bash that uses `go run` to run Microfactory for the first time, go programs can be quickly bootstrapped entirely from source (and a standard go distribution).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type GoPackage ¶
type GoPackage struct { Name string // contains filtered or unexported fields }