Optimize rebuilds by reducing $(shell) usage
$(shell) isn't particularly fast in Kati, and they have to be executed both when reading the makefiles and determining whether the ninja file needs to be regenerated. Right now, the regen time is mostly hidden because we run them in parallel. We've also configured it to ignore any commands that contain "echo", "date", or the output directory. That happens to remove most commands that contain side effects, so running them in parallel is fine. But the side effects contain some important things, like the clean up necessary when switching products. So I'm removing those filters, and then we'll need to run the shell commands in sequence, since there will be side-effects. That makes regen take longer though, so use pure-Make implementations instead of $(shell) where possible. This set of changes reduces aosp/master aosp_arm64-eng build $(shell) usage and time by 2/3: *kati*: func shell time: 3.135095 / 709 *kati*: func shell time: 1.067331 / 236 Bug: 30947985 Test: Manual test lines for math functions Test: Compare build-aosp_arm64.ninja before/after Change-Id: I4fc9d6318957992921972994f277c17918e7e1eb
Loading
Please register or sign in to comment