Build Windows clang-cl with zlib support
Categories
(Firefox Build System :: Toolchains, task, P3)
Tracking
(Not tracked)
People
(Reporter: glandium, Unassigned)
References
Details
Because llvm-profdata merge
runs on Windows during the profile run task, it needs to have the same features as the clang that produces the profiling code and data. When doing the instrumented builds as cross builds with clang-cl on Linux, the resulting profiling data contains names compressed with zlib, and llvm-profdata fails with:
error: default_2136_random_12525866434295321325_0.profraw: Profile uses zlib compression but the profile reader was built without zlib support
A workaround is to disable name compression at compile time (-mllvm -enable-name-compression=false
), which works, but it feels like it would be better if we could build the zlib support in clang-cl on Windows.
Found this randomly on the internet about how to build zlib on windows, which would be a prerequisite:
https://stackoverflow.com/questions/53948954/how-to-compile-zlib-with-clang-and-cmake
http://blog.morzproject.com/post/compile-static-zlib/
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
I'm having a hard time getting around to this bug, and the more I think about it, the more the workaround sounds reasonable. Getting zlib going is engineering work and a more complicated build-clang for little gain, especially when you consider that it's no worse than existing native builds.
Alternatively, could we run llvm-profdata merge
on the optimize-phase builder?
Updated•3 years ago
|
Comment 2•3 years ago
|
||
We appear to be surprisingly close to GeckoView builds working in windows mozilla-build, but it dies out in linking with
x86_64-linux-android/4.9.x\libgcc.a(unwind-dw2.o) contains a compressed section, but zlib is not available
glandium notes
yeah, we don't have zlib support in our clang build on windows, because that requires building zlib separately, and we don't have that in place
Comment 3•3 years ago
|
||
Just leaving this note from glandium for reference:
when bug 1755415 makes it to central, you might want to try to remove --rtlib=libgcc from build/moz.configure/toolchain.configure, that might work around the problem (or might fail for other reasons)
Updated•2 years ago
|
Description
•