If there are any goals on the command line, kati hides targets that are
not dependencies of those goals. Revert this until kati is modified to
include all targets.
This reverts commit b71d24931c.
Bug: 24339367
Change-Id: I7c3a950aef8efc9a0eb72bd29ee07710d2faca99
Use md5sum as the build.ninja filename suffix if the suffix is longer
than 64 characters. Also store the original suffix in a corresponding
.suf file for human lookup.
This fixes the "File name too long" error when kati tries to write to
build.ninja with the long original suffix.
Bug: 24302576
Change-Id: Ie04b0c14e1a9d593aa5c2a6b357b19a9e8a7158e
Only goals that modify the parsing need to be passed to kati, filter out
everything else and only pass it to ninja.
Change-Id: I28788a3409d601fe838749bcf15394bc8f3d775b
When parallelism is being handled by ninja, pass --ninja to makeparallel
to have it translate -j with no number to default ninja parallelism, and
-k to -k0.
Bug: 24199503
Change-Id: Ic1be7572f93b33e4a71ed23e9e73dea1d4255703
For some special targets (PRODUCT-%), the MAKECMDGOALS variable is
modified. Before this change, using one would result in a "no rule to
make target" error, since the new target was not stubbed out.
Change-Id: I879642a48b84a66789d4bdb7db1b6fd1130819b7
When USE_NINJA=true is set, use makeparallel to claim all jobs from make and
pass them to ninja with -j. If USE_GOMA is set, pass the -j flag to
kati instead so the parallelism can be set in the local_pool instead.
Change-Id: I6e4f957c65683b74533ecb6d33e25de858922823
$(PARSE_TIME_MAKE_GOALS) is a list of known goals which affect
parsing of make (e.g., there is $(filter XXX,$(MAKECMDGOALS))).
If the make targets contain one of them, we keep using a
different build.ninja for each combination of make targets.
Otherwise, we use the same build.ninja which has all phony
targets.
Also load vendor/google/build/ninja_config.mk so it can add
Google-specific goals to $(PARSE_TIME_MAKE_GOALS).
Bug: 23685536
Change-Id: I3da5c76fa7644a05a55c374a754212f4fb794818
This fixes two issues:
- Switching make target didn't work well when the latter
make target is not a subset of the first make target.
- Switching between m and mm/mmm forced build.ninja to be
regenerated.
Bug: 23685536
Change-Id: I3c3550d6cca3007d166a13367d6bc22cc3feede2
With USE_GOMA, the path to gomacc in $GOMA_DIR or $HOME/goma
will be appended to CC_WRAPPER and CXX_WRAPPER.
Note this works only with USE_NINJA. Unlike ninja, GNU make
cannot change the parallelism depending on targets. Specifying
-j500 to GNU make would mean you may run 500 local jobs in
parallel, but with -j32 goma will just slow down the build.
Change-Id: I0f571454fd2a5b525ee29b445f7ab8715927ca00
* --regen
Re-generate build.ninja only when necessary. If either
1. .mk file is updated,
2. environment variable is updated,
3. $(wildcard) result is changed, or
4. $(shell) result is changed,
ckati will regenerate ninja file. This check takes only ~1
second, so incremental build will become much faster even
without "fastincremental" target.
* --ignore_dirty=out/%:
Some .mk files in out/ (e.g.,
out/target/product/generic/previous_build_config.mk)
are updated while ckati is running. With this flag, ckati
does not regenerate build.ninja when they look modified.
This should be OK for ninja based build, as ninja handles
command line changes nicely.
Change-Id: I7a2fca0e327d999599d6b16f06358e8a5e657565
The build system removes targets like "PRODUCT-full-eng" from
MAKECMDGOALS in build/core/product_config.mk.
Without this change, such target isn't passed to kati.
Change-Id: I0b3949ed1f5557445d7f5d5bd59b7875c0b2ea7f
If USE_NINJA=true, use kati to translate makefiles into ninja files,
and then execute them with ninja.
Builds kati from source using simplified versions of the rules
in binary.mk and definitions.mk.
Adds two new goals when USE_NINJA=true: generateonly will regenerate
build.ninja but not rebuild (useful for comparing build.ninja output
between runs), and fastincremental will skip regenerating build.ninja
and go directly to running ninja, providing ~5 second incremental
builds.
Change-Id: Ib85399e730f1fbb1be7371fafeee7d1c31080771