Current shortcomings/future work:
* Unfortunately this currently takes the form of a separate, standalone
build (with the just-built stage2 toolchain), which makes this a
little more convoluted. The upstream compiler-rt build system does
not have a way (that I could find) to manually add additional targets
to the build.
* GNU strip (binutils) does not understand the WebAssembly binary, so
dh_strip fails. llvm-strip does, but a) does not understand all the
arguments that dh_strip passes (e.g. -N), b) fails with "invalid
relocation offset" on --strip-debug (but works with --strip-all).
This currently passes -X to dh_strip to exclude them from being
stripped entirely. Invoking llvm-strip manually with --strip-all can
be considered in the future.
* The wasm32/wasm64 binaries are, by design, architecture-independent.
With this commit, they are being built in every architecture, and
shipped in the libclang-common-X.Y-dev package, which is arch: any,
but ships both architecture-dependent (native/host compiler-rt) and
architecture-independent files (include headers etc.).
In a future iteration, the wasm32/wasm64 compiler-rt library could be
factored out to a separate (arch: all) package. This is left
outstanding because it should probably happen alongside a different
split for libclang-common-X.Y-dev that will include splitting the
native libclang-rt as well.
Closes: #1010932
Fails with cmake binary backport like on bionic s390x
[0/4] cd "/build/llvm-toolchain-snapshot-15~++20220214091440+07153f7e072d/build-llvm/runtimes/runtimes-bins" && /tmp/cmake/bin/cmake --build .
/tmp/cmake/bin/cmake: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
Thanks to Sam McCall for the patch
* Unbreak llvm-toolchain-12 on buster.
-fuse-ld=gold wasn't passed to compiler-rt. it was using bfd.
And binutils shipping in buster has a bug preventing this to work:
https://github.com/llvm/llvm-project/issues/42339
* Rename ocaml-nox => ocaml-base (Closes: #1002608)
* Remove Build-Conflicts: ocaml
* Rebuild to workaround the coinstallability issue (Closes: #996858)