Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 245923003: Fix msvs-ninja OutputDirectory path. (Closed)

Created:
6 years, 8 months ago by bungeman-chromium
Modified:
6 years, 6 months ago
CC:
gyp-developer_googlegroups.com
Visibility:
Public.

Description

Fix msvs-ninja OutputDirectory path. _FixPath is designed to take gyp paths and convert them to msvs project paths. This translates a <gyp_dir>"<gyp_dir_to_X>" to <msvs_project_dir>"<msvs_project_dir_to_gyp_dir>/<gyp_dir_to_X>". The OutputDirectory when using ninja as the external builder with the ninja generator generated build files needs to be the path <msvs_project_dir>"<msvs_project_dir_to_ninja_build_config>". Since this is specified on a per target basis and will be run though _FixPath, the external builder directory in the target must be specified as <gyp_dir>"<gyp_dir_to_toplevel_dir>/<toplevel_dir_to_ninja_build>/<config>". Chromium currently does not see any issue as it does not set generator_output. When generator_output is not set, _GetPathOfProject sets fix_prefix to None. Also, Chromium appears to be using an absolute path for msvs_external_builder_out_dir. This is, however, affecting Skia, which sets generator_output to 'out' and places all of its gyp files in a 'gyp' directory. As a result Skia is seeing the OutputDirectory set to "../../gyp/out/$(Configuration)". This change fixes this to "../../out/$(Configuration)". R=scottmg@chromium.org Committed: https://code.google.com/p/gyp/source/detail?r=1926

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : Can now run just msvs-ninja. #

Total comments: 4

Patch Set 9 : Find MSBuild with registry. #

Total comments: 2

Patch Set 10 : FindVisualStudioInstallation to locate MSBuild. #

Total comments: 3

Patch Set 11 : Simplify and correct pathing. #

Total comments: 4

Patch Set 12 : Use reg.exe instead of _winreg. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -36 lines) Patch
M buildbot/buildbot_run.py View 1 2 3 4 5 6 7 8 9 10 3 chunks +8 lines, -2 lines 0 comments Download
M pylib/gyp/generator/msvs.py View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -5 lines 0 comments Download
M test/ios/gyptest-xcode-ninja.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -6 lines 0 comments Download
M test/lib/TestGyp.py View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +119 lines, -23 lines 0 comments Download
A test/lib/TestWin.py View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +101 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
bungeman-chromium
It appears that there is currently no bot coverage for external builders? The win32 failure ...
6 years, 8 months ago (2014-04-22 15:33:07 UTC) #1
Shezan Baig (Bloomberg)
On 2014/04/22 15:33:07, bungeman2 wrote: > It appears that there is currently no bot coverage ...
6 years, 8 months ago (2014-04-22 15:47:52 UTC) #2
bungeman-chromium
As a test, I have added 'msvs-ninja' to TestGyp and have it running the relevant ...
6 years, 8 months ago (2014-04-26 14:33:52 UTC) #3
Shezan Baig (Bloomberg)
Sorry for the delay. I tried the patch locally, but ran into the following problem: ...
6 years, 7 months ago (2014-04-29 21:19:15 UTC) #4
Shezan Baig (Bloomberg)
It works when I run with -fmsvs-ninja,ninja But it fails if I run with just ...
6 years, 7 months ago (2014-04-29 21:20:39 UTC) #5
Shezan Baig (Bloomberg)
@bungeman2, did you get a chance to look at #4? I think you just need ...
6 years, 7 months ago (2014-05-23 17:17:30 UTC) #6
bungeman-chromium
On 2014/05/23 17:17:30, Shezan Baig (Bloomberg) wrote: > @bungeman2, did you get a chance to ...
6 years, 7 months ago (2014-05-23 17:43:02 UTC) #7
bungeman-chromium
Now works when running with just msvs-ninja. Scott, if you're available, you're might be the ...
6 years, 6 months ago (2014-05-28 20:06:00 UTC) #8
scottmg
Sorry for the delay. https://codereview.chromium.org/245923003/diff/140001/test/lib/TestGyp.py File test/lib/TestGyp.py (right): https://codereview.chromium.org/245923003/diff/140001/test/lib/TestGyp.py#newcode136 test/lib/TestGyp.py:136: realFormat = self.format.split('-')[-1] realFormat -> ...
6 years, 6 months ago (2014-05-30 16:41:37 UTC) #9
bungeman-chromium
https://codereview.chromium.org/245923003/diff/140001/test/lib/TestGyp.py File test/lib/TestGyp.py (right): https://codereview.chromium.org/245923003/diff/140001/test/lib/TestGyp.py#newcode136 test/lib/TestGyp.py:136: realFormat = self.format.split('-')[-1] On 2014/05/30 16:41:37, scottmg wrote: > ...
6 years, 6 months ago (2014-05-30 22:18:08 UTC) #10
Shezan Baig (Bloomberg)
https://codereview.chromium.org/245923003/diff/170001/pylib/gyp/generator/msvs.py File pylib/gyp/generator/msvs.py (right): https://codereview.chromium.org/245923003/diff/170001/pylib/gyp/generator/msvs.py#newcode1814 pylib/gyp/generator/msvs.py:1814: ninja_generator.ComputeOutputDir(params) + '\\$(Configuration)' I ran into another issue with ...
6 years, 6 months ago (2014-05-31 05:09:55 UTC) #11
bungeman-chromium
I believe that this now computes the paths correctly at PS11. ptal https://codereview.chromium.org/245923003/diff/170001/pylib/gyp/generator/msvs.py File pylib/gyp/generator/msvs.py ...
6 years, 6 months ago (2014-06-02 14:55:47 UTC) #12
scottmg
lgtm w/ below https://codereview.chromium.org/245923003/diff/190001/test/lib/TestGyp.py File test/lib/TestGyp.py (right): https://codereview.chromium.org/245923003/diff/190001/test/lib/TestGyp.py#newcode764 test/lib/TestGyp.py:764: import _winreg I don't think this ...
6 years, 6 months ago (2014-06-02 16:04:49 UTC) #13
bungeman-chromium
I have pulled in the registry query method of MSVSVersion.py with PS212. If the test ...
6 years, 6 months ago (2014-06-02 17:35:30 UTC) #14
bungeman-chromium
Committed patchset #12 manually as r1926.
6 years, 6 months ago (2014-06-04 16:07:34 UTC) #15
bungeman-chromium
On 2014/06/04 16:07:34, bungeman2 wrote: > Committed patchset #12 manually as r1926. Since I'm fairly ...
6 years, 6 months ago (2014-06-04 16:17:41 UTC) #16
Shezan Baig (Bloomberg)
6 years, 6 months ago (2014-06-04 16:31:19 UTC) #17
Message was sent while issue was closed.
On 2014/06/04 16:17:41, bungeman2 wrote:
> On 2014/06/04 16:07:34, bungeman2 wrote:
> > Committed patchset #12 manually as r1926.
> 
> Since I'm fairly sure this is correct I have landed this. If there are any
> issues, please let me know.
> 
> There are a few things which I've learned working on this which translate into
> future improvements.
> 
> 1. There is now an msvs-ninja test harness, there should also be an
xcode-ninja
> test harness.
> 
> 2. There is now an msvs-ninja test harness, but only a few select tests (those
> relevant to this change) are enabled. There are currently 31 failing tests if
> the test suite is run against msvs-ninja. These should be examined and
decisions
> made on what should be supported and fixed, and what can be ignored.
> 
> 3. Calling vsvars.bat with vs2013 is really, really slow. It takes ~10s to run
> on my machine. This is run at least twice per test, so running the tests on
> Windows has huge overhead. In order to run the tests in a reasonable amount of
> time, I disabled the actually running of vsvars.bat in msvs_emulation.py and
ran
> vsvars.bat from the cmd.exe from which I ran the tests.
> 
> I should probably open issues for these, but I wanted to note these points
here
> as well.


Awesome -- thanks for this change :)

I will be rebasing within the next few days, so hopefully will pick up your
latest changes.  Will let you know if I run into any issues.

Powered by Google App Engine
This is Rietveld 408576698