microfactory

command
v0.0.0-...-9c402f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 19 Imported by: 0

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 -s <microfactory_src_dir> -b <microfactory_bin_file>, Microfactory can rebuild itself as necessary. Combined with a shell script like soong_ui.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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL