4 ms·
Text for those who can't/won't log in for it: AOSP master platform builds now build with ninja instead of GNU make. The build/core makefiles and Android.m
by voltagex_ 11y ago
Text for those who can't/won't log in for it:
AOSP master platform builds now build with ninja instead of GNU make.
The build/core makefiles and Android.mk files are read by kati
(https://github.com/google/kati/blob/master/README.md), which will
interpret them and write out a $OUT_DIR/build_$(TARGET_PRODUCT).ninja
file, and then the execution of the build rules will be handled by
ninja (https://martine.github.io/ninja/).
Building with kati and ninja provides some immediate benefits:
1. Faster startup time for new builds. Running kati and then ninja
results in builds starting about 25% faster than GNU make.
2. Much faster incremental builds. kati caches the mtimes of files
and directories it read, what environment variables it used, etc., and
only re-reads all the makefiles if something has changed. This
includes globs like $(call all-files-under). Incremental builds with
a warm disk cache will start within 5 seconds.
3. Better build command output. Ninja buffers the output of each
command and prints it without mixing output from multiple commands,
meaning error messages will be printed as a group after a build
failure, and not mixed with other concurrent build output. Ninja also
prints a configurable status line that defaults to printing the
percentage of build commands that have been run, the number that have
been run, and the number that need to run, giving a reasonable
approximation of the progress through the build.
4. Incremental builds should be more reliable. Ninja considers
outputs whose command line has changed to be dirty, which will catch
changes to global cflags, etc. and rebuild anything that has changed.
The use of ninja should be transparent, it is wrapped by the top level
Makefile, so all make-based commands should continue to work.
These changes are a precursor to a much larger change that will
replace all the Android.mk files with data files using a format that
provides much better error checking, even faster builds, and 100%
reliable incremental builds.
- buro9 11y agoIt didn't require sign-in to view.
- dsp1234 11y agoGoogle groups, in Chrome at least, requires you to sign in if you have a google account cookie (signed in to any google account at some point), but are currently not logged in. This occurs unless you specifically run google groups in a new incognito window.
- orf 11y agoGoogle groups has to be one of my most hated sites. It's always so slow, so hard to read and the forced sign in thing is so annoying. I groan internally every time I get taken there. There is some good content on there, but it seems like it's going the way of google code (which could have been github if google had played it right).
- voltagex_ 11y agoThanks! This is annoying.
- magicalist 11y agoNot to derail further, but I just signed in, logged out, and it doesn't require me to sign in...
- e12e 11y agoI appreciate the sentiment, but now I have to side-scroll to read ;-) Maybe I'm just using an unusually large font for reading hn, but I find that <pre>/indented/code blocks on hn are best limited to around 50 character width - preferably a little less - to avoid scrollbars.
- voltagex_ 11y agoCan't please everyone ;)
- easytiger 11y agoif you can't get 80 columns in your viewport you need to go back to 1974 and start using 80c wide punchcards.
- erikpukinskis 11y agoThis may blow your mind, but I code in 40 columns. By choice. It's amazing.
- easytiger 11y agoonly if you write in APL is this acceptable
- erikpukinskis 11y agoI write in JavaScript.
- vetinari 11y agoNot everyone is reading on the computer all the time. Try using phone and you will get his point.
- easytiger 11y agoI do use a phone. 80c wide is fine.
- Flenser 11y agoColin's reply to the followup question about the last paragraph is interesting: On Wed, Nov 4, 2015 at 4:54 PM, Colin Cross (ccr...@android.com) wrote: >On Wed, Nov 4, 2015 at 4:29 PM, Dmitry Blotsky <dmitry....@gmail.com> wrote: >> These changes are a precursor to a much larger change that will >> replace all the Android.mk files with data files using a format that >> provides much better error checking, even faster builds, and 100% >> reliable incremental builds. >> >> Are you referring to the ninja format, or to something else? > >Android.mk files will be replaced with Blueprints files. For an >in-progress example, see >https://android.googlesource.com/platform/bionic/+/master/libc/Android.bp. Blueprint takes build descriptions written in Go and generates ninja files from them: https://github.com/google/blueprint/ https://github.com/google/blueprint/