summaryrefslogtreecommitdiff
path: root/soong_ui.bash
AgeCommit message (Collapse)Author
2018-12-28Fix: soong_ui.bash's wrong check for TOP variableJooyung Han
soong_ui.bash defines `gettop` function and it finds top of the source tree. It also checks if `TOP` is properly set and if set use it. However its check was using the wrong operator (`-z`) for it. Test: m -j Change-Id: Ie86dc340a9f89f45ff0828ea43f6afa3713bda76
2017-07-24Switch to blueprint's microfactoryDan Willemsen
Bug: 63720725 Test: m -j nothing Test: mkdir o; ../bootstrap.bash; ./soong Change-Id: Id1f8312678f36afd08b49f8511fec3e6e5ba8de2
2017-07-12Support running soong_ui.bash from anywhere in the treeDan Willemsen
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
2017-05-15Add build_test.sh, split common parts of soong_ui.bashDan Willemsen
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
2017-03-02Fix OUT_DIR_COMMON_BASE with soong_uiDan Willemsen
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
2017-02-22Don't use runtime.Version() to find the current go versionDan Willemsen
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
2017-02-06Add microfactory to bootstrap a go program with minimal overheadDan Willemsen
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