-
Notifications
You must be signed in to change notification settings - Fork 40
Building from the source
8gb RAM minimum
windows 7 x64 required
look https://github.com/Feodor2/Mypal/wiki/building-from-the-source
Since 68.13 I went to rust 1.45, also this stage is the most diffcult one, in addition the stupid shim cmake refuses to work with ewdk and also to be fixed. So far can take regular rust to build version for win7 and vista may be too, anyway to have wim7 machine for building.
You are to build own rust compiler, and x64 required For mypal68 i took version 1.35 I have built x86 rust first but it fails with out of memory on mypal building. So build both x86 and x64 rusts. Building the rust such a hassle. I used the same build tools as for the old mypal (mozilla-build and ewdk) also cmake is required - i took version 3.21.3 CMake suite maintained and supported by Kitware (kitware.com/cmake).
The config inside the "config.toml"
Set these:
[llvm] targets = "X86" experimental-targets = "" [build] build = "i686-pc-windows-msvc" host = "i686-pc-windows-msvc" target = "i686-pc-windows-msvc" docs = false
Put my rust patch in the rust src dir and apply it under mozilla-build launch "python x.py" It begins downloads a bunch of files including llvm source Builds something then again downloads another bunch and so ans so... So the internet connection required all the way, to bother how to prevent this behavior. I did not bother what llvm it has taken but it failed on llvm first time, so needed a patch too, put in the llvm src and apply Continue and it is to be complete normally Now you have x86 rust and the part of it is needed later Change in the rust config all "i686" to "x86_64" Build x64 rust by "python x.py" again
Complete rust compiler will be inside "build\x86_64-pc-windows-msvc\stage2" I have copied it in the "C:\dev\rust135" and added "C:\dev\rust135\bin" into the path "cargo.exe" is required also but not built, take it from regular rust and put inside the "C:\dev\rust135\bin" Pay attention the "cargo" in the rust is like the "make" in 'c' languages. Then copy content of "build\i686-pc-windows-msvc\stage2\lib\rustlib" to the "C:\dev\rust135\lib\rustlib" Consider the instalation is complete. Add to the path "C:\dev\rust135\bin"
This rust program also required I simple have taken by "C:\dev\git\bin\git clone https://github.com/eqrion/cbindgen" and compiled with my rust.
I got some stupid error don't recall when i compiled it by "cargo" so you may do have it too, then compile it without cargo.
Add to the path
Take it x86_64-pc-windows-msvc version 9.0.0 Strange but there was missed "llvm-config.exe" so take it from rusts "build\x86_64-pc-windows-msvc\llvm\bin" Don't forget to add to the path
Almost the same as the old mypal default .mozconfig