Build:MozillaBuild For x64
From Mozilla x86-64
How to setup for x64 build environment. You cannot use same way of building 32-bit version. Also, for MSYS, see MSYS and Cygwin on x64 (AMD64) at first.
Contents |
Mozilla-Build
At first, download MozillaBuild package from https://developer.mozilla.org/en/Windows_Build_Prerequisites#MozillaBuild.
Extract moztools-x64.zip
For building x64 binaries, need nsinstall, glib-1.2 and libIDL of 64-bit version. You can download as buildtools64-static.zip from Download page. If you want to build buildtools for x64 from source code, see Build:MozTools page.
After downloaded it, you extract it into c:\mozilla-build.
Instead of start-msvc8.bat...
When you use Visual Studio 2005, official win32 build recommends start-msvc8.bat.
But current build environment setup script such as start-msvc8.bat in mozilla-build doesn't support to setup x64 build environment. The following script will be able to setup environment values. You may have to modify this if you change install path of tools.
If you use Visual Studio 2008, you have to change some values to fit Visual Studio 2008's path.
SET MOZ_MSVCVERSION=8 SET MOZBUILDDIR=C:\mozilla-build SET MOZILLABUILD=%MOZBUILDDIR% SET MOZ_TOOLS=%MOZBUILDDIR%\moztools-x64 SET PATH=%PATH%;%MOZ_TOOLS%\bin call "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\bin\amd64\vcvarsamd64.bat" SET SDKDIR=C:\Program Files\Microsoft SDKs\Windows\v6.0 SET INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%INCLUDE% SET PATH=%SDKDIR%\bin\x64;%SDKDIR%\bin;%PATH% SET LIB=%SDKDIR%\lib\x64;%LIB% %MOZILLABUILD%\msys\bin\bash --login -i
Sample .mozconfig file
This is a sample .mozconfig to build Firefox.
. $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../objdir ac_add_options --target=x86_64-pc-mingw32 ac_add_options --host=x86_64-pc-mingw32 ac_add_options --enable-optimize=-Ox ac_add_options --with-windows-version=501 ac_add_options --disable-updater
Note that --target and --host have to set x86_64-pc-mingw32 due to no uname.exe for x64.
Can I use x64 version tools such as python?
Yes. Since there is Python, info-zip and 7-zip of x64 version, you can replace 32-bit version into MozillaBuild package with 64-bit version.
bash not response?
When you run bash on some x64 environment, ssh-agent will hang. So if you hang bash, you need remove c:\mozilla-build\msys\etc\profile.d\profile-sshagent.sh.
