Last Comment Bug 686837 - Add VS11 (VS2012) support for mozilla-build
: Add VS11 (VS2012) support for mozilla-build
Status: RESOLVED FIXED
:
Product: mozilla.org
Classification: Other
Component: MozillaBuild (show other bugs)
: other
: x86_64 Windows 8
: -- normal (vote)
: ---
Assigned To: Gregory Szorc [:gps]
:
Mentors:
Depends on: 712841
Blocks: 631910 686843 VC11 754810
  Show dependency treegraph
 
Reported: 2011-09-14 23:37 PDT by Brian R. Bondy [:bbondy]
Modified: 2012-09-14 17:19 PDT (History)
24 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Detect MSVC2011 and add startup scripts (9.88 KB, patch)
2011-09-16 22:37 PDT, Gregory Szorc [:gps]
ted: review+
Details | Diff | Splinter Review

Description Brian R. Bondy [:bbondy] 2011-09-14 23:37:35 PDT
I think we'll need new mozilla-build support for VS2011.  

In particular 2 new scripts:
start-msvc11.bat
start-msvc11-x64.bat
Comment 1 :Ehsan Akhgari 2011-09-15 12:54:39 PDT
Out of curiosity, have you tried building with VS2011 yet?
Comment 2 Brian R. Bondy [:bbondy] 2011-09-15 20:47:53 PDT
No not yet, I plan to once I get back to a desktop I can install on. I don't want to try building on my laptop VM due to disk space and time :)
Comment 3 :Ehsan Akhgari 2011-09-16 08:31:43 PDT
(In reply to Brian R. Bondy [:bbondy] from comment #2)
> No not yet, I plan to once I get back to a desktop I can install on. I don't
> want to try building on my laptop VM due to disk space and time :)

Definitely, makes sense.  Please file bugs (I'm sure there will be some!) and CC me on them as well.
Comment 4 Gregory Szorc [:gps] 2011-09-16 21:22:23 PDT
I have Windows 8 installed in Virtualbox and am in the process of trying to wrangle mozilla-central into building. I've started https://developer.mozilla.org/en/Windows_8 and will be documenting my progress there. As things mature, we can move the content to other developer.m.o articles (I don't want to pollute the existing articles until things are more solidified).

Expect some patches and new bugs to follow.
Comment 5 Gregory Szorc [:gps] 2011-09-16 22:37:29 PDT
Created attachment 560674 [details] [diff] [review]
Detect MSVC2011 and add startup scripts

This adds support for MSVC 2011 and SDK 8.0. I followed the convention of the existing files.

On my Windows 8 Developer Preview install, I dropped the changes in a built mozilla-build directory and the 2 batch files executed fine.

I have tested with Visual Studio 2011 preview installed. But, the scripts do detect Visual Studio 2011 Express properly.

I have NOT tested with Windows SDK 8.0 because I do not yet have it installed. But, I'm optimistic it will work. I'll let others decide if we will take that chance and check this in as-is.
Comment 6 Brian R. Bondy [:bbondy] 2011-09-18 16:44:54 PDT
Comment on attachment 560674 [details] [diff] [review]
Detect MSVC2011 and add startup scripts

Review of attachment 560674 [details] [diff] [review]:
-----------------------------------------------------------------

::: start-msvc10.bat
@@ +1,4 @@
>  @echo off
>  
>  SETLOCAL
> +SET MOZ_MSVCVERSION=11

We do not want to break compatibility with people who want to build with VS2010.  So this should be in a new file start-msvc11.bat and ditto for the x64 variant.
Comment 7 Brian R. Bondy [:bbondy] 2011-09-18 16:48:08 PDT
Re the Windows SDK 8.0 change as well, we should be testing it since there are code changes for it. 
Also have you tried building as x64 yet? That should be tried first as well before a positive review can be given.

Here's an example x64 .mozconfig file:
ac_add_options --enable-application=browser
ac_add_options --enable-debug
ac_add_options --disable-static
ac_add_options --disable-optimize
ac_add_options --enable-tests
ac_add_options --enable-logging
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
Comment 8 Gregory Szorc [:gps] 2011-09-18 17:44:04 PDT
(In reply to Brian R. Bondy [:bbondy] from comment #6)
> ::: start-msvc10.bat
> @@ +1,4 @@
> >  @echo off
> >  
> >  SETLOCAL
> > +SET MOZ_MSVCVERSION=11
> 
> We do not want to break compatibility with people who want to build with
> VS2010.  So this should be in a new file start-msvc11.bat and ditto for the
> x64 variant.

Yeah, Bugzilla's diff tool doesn't show that I used `hg cp` to copy start-msvc10.bat to start-msvc11.bat and then modified the copy. If you look at the raw diff, you'll see I actually created new files.

w.r.t. x64, I'll test that.

As for Windows SDK 8.0, it appears to only be available on MSDN to people with a premium subscription. Unfortunately, it appears I am not currently one of those people. I thought the ISO release notes mentioned an SDK, though. Maybe it is in a weird location or only the ARM version is available. I'll poke around.
Comment 9 Brian R. Bondy [:bbondy] 2011-09-19 06:43:17 PDT
re splinter review fail: OK thanks for letting me know :)

re Windows SDK 8.0: If we can't access it I think that is fine for now.  I'm not a module peer for this though so I'll let your reviewer make the call.

Please feel free to re-request review after you try on x64.
Comment 10 Brian R. Bondy [:bbondy] 2011-09-29 12:35:21 PDT
Any update on this bug?
Comment 11 Gregory Szorc [:gps] 2011-09-30 15:36:43 PDT
I haven't tried running in x64 mode yet. And, I won't have access to the machine where the Windows 8 VM is until Monday.

If it can't wait until then, anyone is free to set up Windows 8 (in Virtualbox) to test this patch. Or, if you want to conditionally r+ on x64 working, I'll update the flags with checkin-needed once I've verified on x64.
Comment 12 Brian R. Bondy [:bbondy] 2011-09-30 17:22:02 PDT
Sounds good, no there's no rush, I just wanted to check in.
Once done please request a review again as I'm not a peer in this yet. 
Thanks for the update.
Comment 13 Gregory Szorc [:gps] 2011-10-02 17:09:02 PDT
Comment on attachment 560674 [details] [diff] [review]
Detect MSVC2011 and add startup scripts

I tried running configure in x64 mode (start-msvc11-x64.bat) and it seems to work! Confirmed that configure output says a 64 bit OS is detected. Compiling seems to work as well.
Comment 14 Ted Mielczarek [:ted.mielczarek] 2011-10-03 04:37:29 PDT
Comment on attachment 560674 [details] [diff] [review]
Detect MSVC2011 and add startup scripts

Review of attachment 560674 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks! khuey is still working on getting a new release of MozillaBuild out, we should get this in when that happens.
Comment 15 Gregory Szorc [:gps] 2011-10-03 13:10:27 PDT
Thanks, Ted. Setting checkin-needed, as I don't have the privs.
Comment 16 Makoto Kato [:m_kato] 2011-10-21 00:52:24 PDT
landed
http://hg.mozilla.org/mozilla-build/rev/a94eedd605ef
Comment 17 Honza Bambas (:mayhemer) 2011-11-07 08:34:20 PST
When is the new release of the MozillaBuild package planed that will contain this change?
Comment 18 Gary Kwong [:gkw] [:nth10sd] 2012-01-10 12:03:07 PST
(In reply to Honza Bambas (:mayhemer) from comment #17)
> When is the new release of the MozillaBuild package planed that will contain
> this change?

I think MozillaBuild 1.6 contains this change.
Comment 19 Makoto Kato [:m_kato] 2012-01-10 17:55:11 PST
(In reply to Gary Kwong [:gkw, :nth10sd] from comment #18)
> (In reply to Honza Bambas (:mayhemer) from comment #17)
> > When is the new release of the MozillaBuild package planed that will contain
> > this change?
> 
> I think MozillaBuild 1.6 contains this change.

Since installer has bug, start-vc11.bat isn't included into this package. See bug 712841.
Comment 20 Gregory Szorc [:gps] 2012-01-10 18:11:00 PST
FWIW you can grab the .bat files from https://hg.mozilla.org/mozilla-build/file/3ba6c690b036.

Also, we found at least one compiler bug in MSVC 2011 where flat-out wrong assembly was emitted, so you may want to stick with a released/stable version if you can.
Comment 21 Jim Mathies [:jimm] 2012-03-21 07:49:34 PDT
Curious when these changes end up in the release version of MozillaBuild? Looking at the date of the current release, it's still back on 23-Nov-2011 04:13 79M. 

http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/
Comment 22 Ted Mielczarek [:ted.mielczarek] 2012-03-21 09:34:36 PDT
This was supposed to go out in the last release, but bug 712841 made it not work. We could probably spin a simple 1.6.1 that includes these files if it would be helpful.
Comment 23 Jim Mathies [:jimm] 2012-03-21 09:46:12 PDT
(In reply to Ted Mielczarek [:ted] from comment #22)
> This was supposed to go out in the last release, but bug 712841 made it not
> work. We could probably spin a simple 1.6.1 that includes these files if it
> would be helpful.

We'll need the batch scripts for win8 metro work. We have access so no major rush but it'd be nice to get these our where devs can easily get at them.
Comment 24 Armen Zambrano [:armenzg] - Engineering productivity 2012-05-11 12:47:10 PDT
Can we please spin a newer version of mozilla-build that I can use for the Win8 infra work? (bug 737994)
I only see the November version [1]

I would prefer not to have to apply patches to the 1.6 release as much as possible.

[1]
http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/
Comment 25 Steven Tseng (:Anachid) 2012-09-14 15:48:24 PDT
As per comment from @armenzg is this landed on the latest build? The documents on from this link (https://developer.mozilla.org/en-US/docs/Windows_8) says otherwise.
Also, now that Visual Studio 2012 is out, is there any major changes? Or I can say this patch will work well if I have visual studio 2012 installed?
Comment 26 Ted Mielczarek [:ted.mielczarek] 2012-09-14 17:06:18 PDT
The latest MozillaBuild (1.6.1) contains this change, yes.

Note You need to log in before you can comment on or make changes to this bug.