|
|
Created:
4 years, 11 months ago by Sébastien Marchand Modified:
4 years, 11 months ago CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUpdate the toolchain if there's a mismatch between the env and win_toolchain.json
BUG=569152
Committed: https://crrev.com/e44b02e42a8b593a83bc569240923d0e6faa64d0
Cr-Commit-Position: refs/heads/master@{#369867}
Patch Set 1 #
Total comments: 1
Patch Set 2 : Update the toolchain if there's a mismatch between the env and the json file. #
Total comments: 4
Patch Set 3 : Address Scott nit. #Patch Set 4 : CURRENT_TOOLCHAIN_VERSION -> CURRENT_DEFAULT_TOOLCHAIN_VERSION #Patch Set 5 : Rebase. #Messages
Total messages: 20 (7 generated)
sebmarchand@chromium.org changed reviewers: + brucedawson@chromium.org, scottmg@chromium.org
PTAL. Not sure if it'll fix the problem or if it's a silly idea (I'm don't really know what's the purpose of the win_toolchain.json file here).
On 2016/01/15 00:49:15, Sébastien Marchand wrote: > PTAL. Not sure if it'll fix the problem or if it's a silly idea (I'm don't > really know what's the purpose of the win_toolchain.json file here). I'm a bit unclear also. Scott?
https://codereview.chromium.org/1582173003/diff/1/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1582173003/diff/1/build/vs_toolchain.py#newco... build/vs_toolchain.py:36: if not os.path.exists(json_data_file): I don't think overriding the version that's coming from the .json file is right. It's just a cache of the data that the toolchain zip stored, so you could end up say that you're building with 2015 when you're actually building with 2013. Woudl it work to instead check if the json matches the environment up here, and if it doesn't then call Update()? I vaguely remember that maybe that's what this if not exists is here for.
Description was changed from ========== vs_toolchain.py: Always use the value of GYP_MSVS_VERSION from the environment. BUG=569152 ========== to ========== Update the toolchain if there's a mismatch between the env and win_toolchain.json BUG=569152 ==========
Patchset #2 (id:20001) has been deleted
This should be better :), I've tried it locally and it seems to work, here's my test scenario: - delete .landmines and unset the GYP_MSVS_VERSION var. - gclient runhooks, check that the .landmines file refers to VS2013. - set GYP_MSVS_VERSION=2015 - gclient runhooks, this time check for VS2015 in the .landmines file. - Unset GYP_MSVS_VERSION - gclient runhooks, check for VS2013 in .landmines
Yeah, that seems better. lgtm, maybe Bruce will suggestions of something to test/try. https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py#n... build/vs_toolchain.py:280: if version != env_version: return version != env_version
Another test (which I think your change will pass): run "gclient runhooks" twice after changing GYP_MSVS_VERSION. When landmines.py is misbehaving the landmine triggers on the second run, which is inefficient and confusing. https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py#n... build/vs_toolchain.py:25: CURRENT_TOOLCHAIN_VERSION = '2013' Should probably be "CURRENT_DEFAULT_TOOLCHAIN_VERSION", to better reflect its actual usage.
Yeah, I've run runhooks multiple time and it works as expected. https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py File build/vs_toolchain.py (right): https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py#n... build/vs_toolchain.py:25: CURRENT_TOOLCHAIN_VERSION = '2013' On 2016/01/15 21:10:52, brucedawson wrote: > Should probably be "CURRENT_DEFAULT_TOOLCHAIN_VERSION", to better reflect its > actual usage. Done. https://codereview.chromium.org/1582173003/diff/40001/build/vs_toolchain.py#n... build/vs_toolchain.py:280: if version != env_version: On 2016/01/15 21:08:13, scottmg wrote: > return version != env_version Done.
Somewhat related: depot_tools\win_toolchain\get_toolchain_if_necessary.py also examines GYP_MSVS_VERSION. So, changing the default requires one of: 1) build\vs_toolchain.py setting GYP_MSVS_VERSION 2) build\vs_toolchain.py passing GYP_MSVS_VERSION to get_toolchain_if_necessary.py on the command-line 3) Simultaneous updates to two repos Option #3 seems like a bad idea. Option #2 is cleanest, but I'm not sure if it is sufficient - if other places also need the value passed along. Any thoughts? It seems at least tangentially related to this change. On the other hand, probably simplest to land this improvement rather than trying to hold so many balls in the air. lgtm, but consider changing CURRENT_TOOLCHAIN_VERSION to CURRENT_DEFAULT_TOOLCHAIN_VERSION to better reflect its meaning.
I think ideally we'd delete all the version override stuff and just have "the toolchain" as pointed to by the hashes. The version override was always a hack. e.g. Does GN really care? Presumably all it really needs is the paths to the toolchain and include dirs anyway.
Rebased and confirmed that it's still working, so I'll land this. +1 to removing the version number and using only the hash.
The CQ bit was checked by sebmarchand@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from scottmg@chromium.org, brucedawson@chromium.org Link to the patchset: https://codereview.chromium.org/1582173003/#ps100001 (title: "Rebase.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1582173003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1582173003/100001
Message was sent while issue was closed.
Description was changed from ========== Update the toolchain if there's a mismatch between the env and win_toolchain.json BUG=569152 ========== to ========== Update the toolchain if there's a mismatch between the env and win_toolchain.json BUG=569152 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Update the toolchain if there's a mismatch between the env and win_toolchain.json BUG=569152 ========== to ========== Update the toolchain if there's a mismatch between the env and win_toolchain.json BUG=569152 Committed: https://crrev.com/e44b02e42a8b593a83bc569240923d0e6faa64d0 Cr-Commit-Position: refs/heads/master@{#369867} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/e44b02e42a8b593a83bc569240923d0e6faa64d0 Cr-Commit-Position: refs/heads/master@{#369867} |