---
title: 不支持部分运行库
description: "```"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0036_0.html
sourcePath: /source/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0036_0.html
indexId: c7f95b72597dbcf15538a4827116c191faef469288d9be3d899a4864d468398082
---
# 不支持部分运行库

#### 错误信息

```
undefined reference to `__muloti4'
```


#### 问题介绍

某符号不在libgcc中，但是在compiler-rt中，特别是使用Clang的__builtin_*_overflow家族的内联函数时。


#### 解决方案

使用--rtlib=compiler-rt来启用compiler-rt，注意目前并不支持所有平台。

如果使用libc++ 或者 libc++abi，使用compiler-rt而不是libgcc_s，通过在cmake中添加-DLIBCXX_USE_COMPILER_RT=YES和 -DLIBCXXABI_USE_COMPILER_RT=YES实现。否则可能会链接两个运行时库，虽然不影响功能但是造成性能浪费。

参考LLVM官方说明：https://clang.llvm.org/docs/Toolchain.html(https://clang.llvm.org/docs/Toolchain.html)。
