首页 > 解决方案 > `__heap_base` seems to be missing in clang 9.0.0, is there a replacement?

问题描述

I'm trying to compile a C library of mine for WebAssembly, using clang (no emscripten), and it compiles fine with clang version 8.0.1, but fails with clang version 9.0.0. The reported error is wasm-ld: error: ….o: undefined symbol: __heap_base. Has __heap_base been replaced with some other symbol?

The library is open source and compilation instructions can be found here

标签: cllvmllvm-clangwebassembly

解决方案


实际上,我相信我找到了罪魁祸首:链接器9.0.0似乎需要--export=__heap_base( -Wl,--export=__heap_basefor the clang)。这适用于我的项目。


推荐阅读