From e48da1e38cc656abc439ff0240fb5bc794186f2c Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Sat, 24 Jan 2026 08:15:22 -0800 Subject: [PATCH] Fix `__muloti4` linker error on Clang 13 Add `-rtlib=compiler-rt` linker flags for the Clang 13 CI build. Clang 13 generates calls to __muloti4 (a 128-bit overflow-checked multiplication intrinsic) for signed 64-bit multiplication with overflow detection. This symbol is provided by LLVM's compiler-rt but is missing from GNU's libgcc, which is the default runtime library on Ubuntu. Related issues: - https://github.com/llvm/llvm-project/issues/14841 - https://github.com/abseil/abseil-cpp/issues/841 - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244169 PiperOrigin-RevId: 860529686 Change-Id: If58dc0328aa1dd87aef8ea02da555f57ad96b02c --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77c887d7..fe4ee3cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -114,6 +114,8 @@ jobs: -G Ninja -DCMAKE_C_COMPILER:STRING=clang-13 -DCMAKE_CXX_COMPILER:STRING=clang++-13 + -DCMAKE_EXE_LINKER_FLAGS:STRING=-rtlib=compiler-rt + -DCMAKE_SHARED_LINKER_FLAGS:STRING=-rtlib=compiler-rt -DMUJOCO_HARDEN:BOOL=ON tmpdir: "/tmp" - os: macos-15