Comment #2 on issue 4101 by vogelh...@google.com: Switch default build tool
to ninja - under the hood
https://code.google.com/p/v8/issues/detail?id=4101
I played a bit with this and wrote a script to test the 2nd approach in #1:
Basically, use a bunch of regexps to post-process gyp-generated ninja files.
1, prefix all paths with the $DIR/
2, prefix all rules + variable names with $DIR_.
3, have a top-level ninja file which subninja-s those and has a phony
target:
d8: phony Debug/d8 Release/d8 ...
This gives us:
$ gclient runhooks # generates out/Debug + out/Release
$ ninja-exp.sh # generates out2/build.ninja from
out/{Debug,Release}/**/*.ninja
$ ninja -C out2 d8 # builds out2/Debug/d8 and out2/Release/d8
Additional thoughts:
- This implementation is super hacky & ugly and should not be used by
anyone.
- Also, it doesn't work for some build artefacts.
- Bug: ninja-files are quite easy to parse.
- Thus, writing a proper implementation wouldn't be too hard.
- Generally, the approach should work with both gyp + gn.
- IMHO, long-term, 'gn' would be the best place for this functionality.
Since 'gn' is generating the ninja files anyhow, it could also be made to
generate such 'multi-config' ninja files.
Attachments:
ninja-exp.sh 1.6 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.