--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yeah, I did see PushPathToEnvironment, but didn't port it over because I found that it didn't actually work :)(Or rather, it only works if PATH is the first environment variable in the env block, because it is using 'c_str()' instead of 'data()', and since each env var is null-terminated, this means it is only ever looking at the first env var).
I figured the reason gyp specified absolute paths was to work around that issue :)
In any case, I think it is better for the generator to provide the absolute path so we only look it up at generation time, rather than making ninja do it at build time.
On Sat, Jul 19, 2014 at 12:15 PM, Shezan Baig <shezb...@gmail.com> wrote:In any case, I think it is better for the generator to provide the absolute path so we only look it up at generation time, rather than making ninja do it at build time.
Agreed.(I guess my only request then for your patch would be to not remove -t msvc for some time. Last time we changed the ninja arguments backwards-incompatibly it was pretty painful for some months as the ninja binary isn't versioned with gyp, so every time someone tried to build old chrome revisions they got messed up.)
Hi folks,
I took my first dive into the ninja code yesterday :) and started by looking at the "-t msvc" stuff. From what I can tell, what this does is simply load an env-file and invoke cl. There's code in there to optionally parse the includes, but we don't use it anymore,
in favor of "deps=msvc" in the main ninja process.
So I was thinking the env-file stuff can probably be generalized into Subprocess, instead of being msvc-specific, and we can eventually remove "-t msvc".I have a work-in-progress patch here [1]. It shaves off about 6K from the ninja binary (using LTCG), while also teaching ninja how to load custom env-files for any Subprocess (not just msvc). Note that this currently only works on Windows, but I can implement it for other platforms too.
Yeah, feel free to try the patch to see if you can get any improvements.
In my tests, I was using a small-ish project (about 1300 cl invocations, taking about 4.5 mins for a clean build). I wasn't seeing any conclusive improvements, the build times were fluctuating by 10-20 seconds, even though I had nothing else running on the machine (virus scanners etc were turned off). This was regardless of whether I had the patch applied or not. So this indicated to me that the process creation was not a significant part of the entire build process. Things did look a lot cleaner in Process Explorer though, which I seem to like for some reason :)
You might notice a difference if you're building chromium, I didn't try with that. Please let me know the results if you try it. Also, I was using msys, not cygwin, if that makes a difference (I'm not sure though).