aboutsummaryrefslogtreecommitdiffstats
path: root/soong_ui.bash
Commit message (Collapse)AuthorAgeFilesLines
* Switch to blueprint's microfactoryDan Willemsen2017-07-241-2/+2
| | | | | | | Bug: 63720725 Test: m -j nothing Test: mkdir o; ../bootstrap.bash; ./soong Change-Id: Id1f8312678f36afd08b49f8511fec3e6e5ba8de2
* Support running soong_ui.bash from anywhere in the treeDan Willemsen2017-07-121-1/+5
| | | | | | | | | | | It will cd to $TOP before running soong_ui itself, so that soong_ui still runs from the top of the tree. ORIGINAL_PWD is saved so that we can reference that later (for example, to move 'mma' implementation into Go). Test: cd system; ../build/soong/soong_ui.bash Test: Set absolute / relative OUT_DIR or OUT_DIR_COMMON_BASE and repeat Change-Id: Icb67a3ee6a3358cca50300755c8953419fc19437
* Add build_test.sh, split common parts of soong_ui.bashDan Willemsen2017-05-151-59/+4
| | | | | | | | | | Move common microfactory functions to cmd/microfactory/microfactory.bash so that they can be used to build both soong_ui for normal build and multiproduct_kati for build system tests. Test: m -j Test: build/soong/build_test.bash Change-Id: I9512642d846ce54d05a027b6d33a2b3029b3f90b
* Fix OUT_DIR_COMMON_BASE with soong_uiandroid-o-preview-1Dan Willemsen2017-03-021-1/+9
| | | | | | | | | | | | | | | | | | | Currently, Kati is the only one that is respecting OUT_DIR_COMMON_BASE, causing the build to fail when ninja tries to match up the Soong and Kati ninja files. The soong_ui.bash script change is necessary to move the microfactory built outputs to the correct location. The config.go change takes care of setting OUT_DIR in the environment of every subprocess, so that we could remove the OUT_DIR_COMMON_BASE handling from Make once the USE_SOONG_UI=false path goes away. Bug: 35929763 Test: m -j blueprint_tools Test: OUT_DIR=... m -j blueprint_tools Test: OUT_DIR_COMMON_BASE=... m -j blueprint_tools Change-Id: I4184f2b4392d32c5bea51e51162a48df0e5c90d5
* Don't use runtime.Version() to find the current go versionDan Willemsen2017-02-221-1/+1
| | | | | | | | | That will be the go version at compile time. So read $GOROOT/VERSION, or fall back to executing `$GOROOT/bin/go version` to find the go version currently in GOROOT. Test: Ensure everything rebuilds when switching between go1.8rc2 and go1.8 Change-Id: I8738a7aa249a088b1e0668af260fa3974844dab7
* Add microfactory to bootstrap a go program with minimal overheadDan Willemsen2017-02-061-0/+101
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. All input files are hashed, and if any change, the necessary packages will be rebuilt. microfactory can (re)build itself as necessary, so combined with a shell script that runs `go run microfactory.go` the first time, it can bootstrap a go program entirely from sources with just a working goroot. Time to build soong_ui only using source & GOROOT: first time no-change incremental microfactory 1400ms 15ms go install 670ms 130ms While microfactory takes longer the first time, almost half of that time is from `go run` and building microfactory for use later. If microfactory only has to build soong_ui, it's about 580ms. Test: USE_SOONG_UI=true m -j blueprint_tools Test: go test -bench . build/soong/cmd/microfactory/microfactory_test.go Change-Id: I4d2b9825788144fa10042bbd804482e44f459a54