Closed Bug 530093 Opened 11 years ago Closed 11 years ago
allow building with VC10 (VC 2010)
Visual C++ 2010 is in public beta, so we should make sure that everything compiles with it. Needs some simple configure changes, and maybe a few other things.
I already added a start-msvc10.bat to the mozilla-build repo: http://hg.mozilla.org/mozilla-build/rev/ad3bd5686474
Separate bug for jemalloc support?
Not sure, I'll see if I get around to it. If I --disable-activex the build completes with just two patches, I'll attach them shortly. The ActiveX bits will need more work, they're full of junk like this: http://mxr.mozilla.org/mozilla-central/source/embedding/browser/activex/src/plugin/StdAfx.h#53 Which the headers that come with VC10 refuse to accept. (They want _WIN32_WINNT to be at least 0x401.)
VC10 complains about the usage of the bitset(0) constructor, saying it's ambiguous between bitset(char*) and bitset(int). The Microsoft docs (as well as other STL docs online) say that the empty bitset constructor initializes all bits to zero, so this should be functionally equivalent.
Attachment #413815 - Flags: review?(jdaggett)
The configure changes are straightforward. The build/win32 changes are mostly straightforward, but I also unwrapped a shell loop into a $(foreach) while there. VC10 dropped support for -OPT:NOWIN98 as a linker option, so I've just unilaterally dropped it from config.mk. From reading the docs it doesn't sound like it has ever done anything useful for us anyway.
Attachment #413862 - Flags: review?(benjamin)
Could I also talk you into making the appropriate change at: http://hg.mozilla.org/mozilla-central/file/6de44a2c2945/tools/trace-malloc/lib/nsWinTraceMalloc.cpp#l55 so that trace-malloc works?
Looks easy, I'll get that in a followup. (I still want to fix the ActiveX stuff too, and maybe jemalloc.)
> + CXXFLAGS="$CXXFLAGS -Zc:wchar_t-" I'm going to remove this. (see bug 508905.) Could you omit this from settings for new compilers?
Pushed those two patches to trunk: http://hg.mozilla.org/mozilla-central/rev/ceef8a5c3ca1 http://hg.mozilla.org/mozilla-central/rev/27937722da69 Masatoshi: oops, I didn't remove that. Sorry! Feel free to remove it with r=me.
(In reply to comment #5) > VC10 dropped support for -OPT:NOWIN98 as a linker option, so I've just > unilaterally dropped it from config.mk. From reading the docs it doesn't sound > like it has ever done anything useful for us anyway. Is the latter confirmed? From bug 130372 comment 33, I would say it doesn't hurt to keep it for non-VC10 builds. Then, why not update the other occurrences too? http://mxr.mozilla.org/mozilla-central/search?string=nowin98&case=1&find=/config.mk
I don't care to support it, so it's gone. I didn't bother removing it from that other location probably because I just didn't notice it. Should probably remove that one too.
Attachment #413815 - Attachment description: fix std::bitset constructor usage in gfx → fix std::bitset constructor usage in gfx [Checkin: Comment 9]
Attachment #413862 - Attachment description: build system changes → build system changes [Checkin: Comment 9]
11 years ago
bug 559537 got filed on the ActiveX stuff in the meantime, so let's call this fixed enough. Should still fix comment 6, and file a followup for jemalloc support.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Filed bug 563316 about jemalloc support.
Ted Mielczarek [:ted, :luser]: I did not try, but I guess the line 3 of the start-msvc10-x64.bat file is probably not right: SET MOZ_MSVCVERSION=9 Should'n it be SET MOZ_MSVCVERSION=10 ?
Yes, Mitch pointed that out and I fixed it: http://hg.mozilla.org/mozilla-build/rev/8b587e01ca0d (I don't think that value is actually used anywhere anyway.)
Bug 585227 has been filed (not by me) for mozilla-1.9.2, mozilla-1.9.1 support.
You need to log in before you can comment on or make changes to this bug.