You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're trying to link Rust into a C++ target and we don't want to create ODR violations between compiler_rt and compiler_builtins.
To avoid this, we set the mangled-names feature on compiler_builtins, so that the intrinsics do not get demangled. This avoids all collisions!
However Rust's compiler_builtins provides some intrinsics that are not present in clang's compiler_rt, for 128-bit integers. Such as: __udivti3 and __umodti3 which are referenced by rust\library\std\src\sys\windows\thread_parking.rs:169.
The mangled-names feature claims that it is for using Rust with compiler_rt, which is good. But it still needs to provide intrinsics that a C++ compiler_rt does not have.
How do we use mangled-names but keep 128-bit integer intrinsics that Rust needs and C/C++ does not provide?