v8gen.py doesn't run gn on extra args |
||
Issue descriptionNinja automatically regenerates ninja files if build files change, but not if the args.gn file changes. E.g. tools/dev/v8gen.py x64.release -- is_component_build=true ninja -C out.gn/x64.release does not incorporate is_component_build=true as this is appended after the gn run wrapped within v8gen. This currently either requires passing -p to v8gen.py or running gn manually like gn gen out.gn/x64.release
,
Sep 21 2016
In this case, we change the args.gn file manually, by just adding a few lines. If you'd do this through "gn args", it'd also always call "gn gen". I don't know if there's a feature that makes ninja rebuild ninja files when the args.gn file has changed.
,
Sep 21 2016
ninja is supposed to rerun gn when you touch args.gn. It does for me: thakis@thakis:~/src/chrome/src$ ninja -C out/gnand boringssl ninja: Entering directory `out/gnand' [1/1] SOLINK ./libboringssl.cr.so ... thakis@thakis:~/src/chrome/src$ touch out/gnand/args.gn thakis@thakis:~/src/chrome/src$ ninja -C out/gnand boringssl ninja: Entering directory `out/gnand' [1/1] Regenerating ninja files <- ### See here ### [1/1] SOLINK ./libboringssl.cr.so
,
Sep 21 2016
Yup, if you're using GN, and look in the build.ninja file in the build directory (out/gnand/build.ninja), you'll see that there's a `build build.ninja: gn` line that lists `depfile = build.ninja.d`. If you look in build.ninja.d, you should see `build.ninja : ... .../args.gn`.
,
Sep 22 2016
Found it. It's a race. Our wrapper is just too fast, it runs gn, then appends more lines to args.gn. This apparently causes an insufficient timestamp increment to be recognized as modified. If I e.g. add a time.sleep(1) in between, everything is fine. Prepped a CL that sets artificially higher modified time: https://codereview.chromium.org/2365573002/
,
Sep 22 2016
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/6cd5d73c6c790a59f9e6a78a9c83b7db83ba4dec commit 6cd5d73c6c790a59f9e6a78a9c83b7db83ba4dec Author: machenbach <machenbach@chromium.org> Date: Thu Sep 22 13:31:25 2016 [build] Fix race in v8gen BUG= chromium:648583 NOTRY=true Review-Url: https://codereview.chromium.org/2365573002 Cr-Commit-Position: refs/heads/master@{#39626} [modify] https://crrev.com/6cd5d73c6c790a59f9e6a78a9c83b7db83ba4dec/tools/dev/v8gen.py
,
Sep 22 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by jochen@chromium.org
, Sep 21 2016