jax
1fdea476 - [ROCm] Use compiler-rt builtins for all clang-based ROCm builds

Commit
131 days ago
[ROCm] Use compiler-rt builtins for all clang-based ROCm builds The ROCm clang is built with -DCLANG_DEFAULT_RTLIB=compiler-rt, meaning it resolves compiler support routines (e.g. __extendhfsf2, the binary16 to binary32 float conversion) from its own libclang_rt.builtins.a rather than from libgcc_s.so.1 at runtime. The hermetic clang (@llvm18_linux_x86_64) and the locally built clang (/usr/lib/llvm-18) both default to libgcc, leaving these symbols as undefined references resolved at runtime from libgcc_s.so.1. On the manylinux_2_28 builder (AlmaLinux 8), libgcc_s.so.1 is from GCC 8 and does not export __extendhfsf2, causing libmlir_for_stubgen_common.so to fail to load during the stub generator action with: ImportError: undefined symbol: __extendhfsf2 Add -rtlib=compiler-rt to rocm_clang_hermetic and rocm_clang_local so all clang-based ROCm builds match the ROCm clang's default. The flag is kept out of the base :rocm config since -rtlib is Clang-only and would be rejected by a GCC host compiler. The builtins are resolved statically at link time from the clang's bundled libclang_rt.builtins.a, introducing no new shared library dependencies and preserving manylinux compliance.
Author
Parents
Loading