Closed Bug 1515528 Opened 6 years ago Closed 6 years ago

Building for aarch64 windows should not require more than --target=aarch64-pc-mingw32

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox66 fixed)

RESOLVED FIXED
mozilla66
Tracking Status
firefox66 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

I installed the arm64 build tools from msvc, and configure can't find the compiler for some reason.
Apparently, configure doesn't find msvc at all on this machine.
Summary: Building for aarch64 windows should not require more than --target=aarch64-pc-mingw32 → Configure can't find MSVC build tools
There are actually two problems. I'll file a separate one for finding msvc build tools.
Summary: Configure can't find MSVC build tools → Building for aarch64 windows should not require more than --target=aarch64-pc-mingw32
Relatedly, it feels like local builds should default to msvc for aarch64-windows until automation switches to clang. David, what do you think? It feels like we should have as much friction-less development for aarch64.
Flags: needinfo?(dmajor)
> Relatedly, it feels like local builds should default to msvc for > aarch64-windows until automation switches to clang. It sounds reasonable. Especially when clang builds don't even compile at the moment.
Flags: needinfo?(dmajor)
Depends on: 1515579
While it was preferable to use lld-link with msvc for performance reasons when we defaulted to compile with msvc, now that we build with clang-cl by default, it's now better to use msvc's linker when using msvc's compiler, especially for aarch64, which is the last place where we actually need msvc.
Depends on D15262
Because MSVC compilers only support one architecture, we need to search "cl" in different toolchain search paths for each of the host and target, especially when they are different. Likewise for the library paths for the linker. Ideally we'd pass -LIBPATH both for host and target, but that has implications for rust that I don't want to have to figure just now. Depends on D15263
With the attached patches, I was able to build for aarch64-windows on x86-64 windows with the following .mozconfig: ac_add_options --target=aarch64 Yep. That's all. I had to go to the Visual Studio Installer to install the arm64 compiler, as well as the arm64 ATL and MFC. With all those, I could them run mach package and then copy the resulting zip to my aarch64-windows machine. Sadly, we don't have a package target that only creates the zip, so it spends a large amount of time doing other stuff, like creating an installer, which takes a while, making cycles longer than they could be.
Depends on: 1516090
No longer depends on: 1516090
Depends on: 1519010
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/a426ddd23654 Prefer link to lld-link when building with msvc rather than clang-cl. r=froydnj https://hg.mozilla.org/integration/autoland/rev/eb83a8375b87 Fix VC paths for arm64. r=froydnj https://hg.mozilla.org/integration/autoland/rev/f1ec67ff7806 Detect MSVC paths separately for host and target. r=chmanchester https://hg.mozilla.org/integration/autoland/rev/c7d7c62b7b11 Prefer MSVC when building for aarch64 windows. r=froydnj https://hg.mozilla.org/integration/autoland/rev/02cd44e39566 Disable accessibility on aarch64-windows. r=dmajor,chmanchester
Blocks: 1523203
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: