|
|
Descriptionclang/win: Start work on getting clang/win working in gn.
This is enough to get base building with clang on Windows.
On Windows, we use clang-cl.exe which is command-line compatible
with cl.exe.
BUG=491209, 404525
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Committed: https://crrev.com/22c76db4a60e2e23c3f8f22f8e08b9b0cb49e002
Cr-Commit-Position: refs/heads/master@{#332563}
Patch Set 1 #
Total comments: 6
Patch Set 2 : x86 #Patch Set 3 : . #
Total comments: 2
Patch Set 4 : comment #
Messages
Total messages: 34 (11 generated)
thakis@chromium.org changed reviewers: + scottmg@chromium.org
Not sure who's the right person to review this…Scott, giving this to you for now and cc'ing a few others who might want to comment. https://codereview.chromium.org/1158763006/diff/1/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/1/build/config/compiler/BUILD... build/config/compiler/BUILD.gn:913: "-Wno-inconsistent-missing-override", #http://crbug.com/428099 `gn format` insisted that I don't put a space after # here
scottmg@chromium.org changed reviewers: + dpranke@chromium.org
+dpranke lgtm https://codereview.chromium.org/1158763006/diff/1/build/config/compiler/BUILD.gn File build/config/compiler/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/1/build/config/compiler/BUILD... build/config/compiler/BUILD.gn:913: "-Wno-inconsistent-missing-override", #http://crbug.com/428099 On 2015/06/02 22:52:58, Nico wrote: > `gn format` insisted that I don't put a space after # here o_O sorry, not sure why https://code.google.com/p/chromium/issues/detail?id=495862. https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.gn File build/toolchain/win/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.g... build/toolchain/win/BUILD.gn:215: if (current_cpu == "x86") { Dirk should look at this part as he did a lot of wrestling with this. In particular I think goma was not in here for some complicated reason that I dont' remember or didn't understand. https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.g... build/toolchain/win/BUILD.gn:216: msvc_toolchain("x32") { "x32"? yuck :(
https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.gn File build/toolchain/win/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.g... build/toolchain/win/BUILD.gn:216: msvc_toolchain("x32") { On 2015/06/02 23:02:21, scottmg wrote: > "x32"? yuck :( That should probably be x86. Hopefully some trybot will inform me about this. (I tried building base with is_clang set to true and false locally, which worked fine)
https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.gn File build/toolchain/win/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/1/build/toolchain/win/BUILD.g... build/toolchain/win/BUILD.gn:216: msvc_toolchain("x32") { On 2015/06/02 23:04:30, Nico wrote: > On 2015/06/02 23:02:21, scottmg wrote: > > "x32"? yuck :( > > That should probably be x86. Hopefully some trybot will inform me about this. (I > tried building base with is_clang set to true and false locally, which worked > fine) Hope so! (x32 seems actively wrong anyway)
Done. Apparently gn defaults to 64-bit builds? :-/ (It's the better default, but having different defaults from gyp confuses me)
On 2015/06/02 23:06:44, Nico wrote: > Done. Apparently gn defaults to 64-bit builds? :-/ (It's the better default, but > having different defaults from gyp confuses me) Yes and yes (defaults to host cpu I think).
Looks like there aren't any gn windows bots. Anyhoo, I checked locally that things now work if I set target_arch=x86 (and I checked that this didn't work with ps1)
On 2015/06/02 23:07:53, Nico wrote: > Looks like there aren't any gn windows bots. Anyhoo, I checked locally that > things now work if I set target_arch=x86 (and I checked that this didn't work > with ps1) There's non-default GN trybots, I added them. (I'm still confused why we used x32 in other places, but I'll assume you or Dirk know what's going on)
Now with even less x32.
The CQ bit was checked by thakis@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from scottmg@chromium.org Link to the patchset: https://codereview.chromium.org/1158763006/#ps40001 (title: ".")
The CQ bit was unchecked by thakis@chromium.org
The CQ bit was checked by thakis@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158763006/40001
lgtm! but Dirk should still look at goma.
brettw@chromium.org changed reviewers: + brettw@chromium.org
LGTM with one change. https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... File build/toolchain/win/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... build/toolchain/win/BUILD.gn:227: cl = "${goma_prefix}$prefix/clang-cl.exe -m32" It seems like the -m32/m64 flags should be set in build/config/compiler:compiler config. This is where the corresponding flags on Posix are set.
lgtm w/ brett's change, but make sure you send this through all of the GN trybots as well as the normal CQ set.
Thanks! https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... File build/toolchain/win/BUILD.gn (right): https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... build/toolchain/win/BUILD.gn:227: cl = "${goma_prefix}$prefix/clang-cl.exe -m32" On 2015/06/02 23:49:20, brettw wrote: > It seems like the -m32/m64 flags should be set in build/config/compiler:compiler > config. This is where the corresponding flags on Posix are set. I think here fits better with the non-clang windows build: foo/cl.exe is msvc's 32-bit compiler, foo/amd64/cl.exe is msvc's 64-bit compiler. Likewise, "bin/clang-cl.exe -m32" is the 32-bit clang compiler, "bin/clang-cl.exe -m64" is the 64-bit clang compiler (they happen to be the same binary, but that's details). But done, have a look at patch set 4. If you like that better, hit cq. Dirk: I think patch set 3 has try jobs for the right bots already. If you think there are bots missing, please add them. (win8_chromium_gn_rel and a few linux gn bots; I tried adding win_chromium_gn_x64_rel since that's in the popup, but apparently that doesn't exist; at least the job ended up grey)
On 2015/06/03 02:38:44, Nico wrote: > Dirk: I think patch set 3 has try jobs for the right bots already. If you think > there are bots missing, please add them. (win8_chromium_gn_rel and a few linux > gn bots; I tried adding win_chromium_gn_x64_rel since that's in the popup, but > apparently that doesn't exist; at least the job ended up grey) Please add the bots to CQ_EXTRA_TRYBOTS just to be explicit, and add the win8_chromium_gn_dbg bot and the mac_chromium_gn_{dbg,rel} bots (mac because you're tweaking the clang defs, which are used there as well but not in the CQ by default yet). The win_chromium_gn_x64_{rel,dbg} bots as well are theoretically available: http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_gn_x... http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_gn_x... have done builds today; that pool might just be overloaded or something, dunno. We might need to bug a trooper about them; feel free to ignore them for purposes of landing this if they don't seem to be responding.
On 2015/06/03 02:38:44, Nico wrote: > Thanks! > > https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... > File build/toolchain/win/BUILD.gn (right): > > https://codereview.chromium.org/1158763006/diff/40001/build/toolchain/win/BUI... > build/toolchain/win/BUILD.gn:227: cl = "${goma_prefix}$prefix/clang-cl.exe -m32" > On 2015/06/02 23:49:20, brettw wrote: > > It seems like the -m32/m64 flags should be set in > build/config/compiler:compiler > > config. This is where the corresponding flags on Posix are set. > > I think here fits better with the non-clang windows build: foo/cl.exe is msvc's > 32-bit compiler, foo/amd64/cl.exe is msvc's 64-bit compiler. Likewise, > "bin/clang-cl.exe -m32" is the 32-bit clang compiler, "bin/clang-cl.exe -m64" is > the 64-bit clang compiler (they happen to be the same binary, but that's > details). > > But done, have a look at patch set 4. If you like that better, hit cq. I like it the new way for consistency. I kind of get what you're saying but I think the same thing could apply to gcc and we should be consitent.
The CQ bit was checked by brettw@chromium.org
lgtm I added the bots I use for triple-checking GN changes.
The patchset sent to the CQ was uploaded after l-g-t-m from dpranke@chromium.org, scottmg@chromium.org Link to the patchset: https://codereview.chromium.org/1158763006/#ps60001 (title: "comment")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158763006/60001
On 2015/06/03 04:29:36, brettw wrote: > lgtm > > I added the bots I use for triple-checking GN changes. Thanks!
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win8_chromium_rel on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...)
The CQ bit was checked by thakis@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1158763006/60001
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/22c76db4a60e2e23c3f8f22f8e08b9b0cb49e002 Cr-Commit-Position: refs/heads/master@{#332563} |