Compilation failing on EnableABIBreakingChecks

本小妞迷上赌 提交于 2019-12-04 13:31:27

Based on the discussion in llvm irc channel.

Try the following command to compile : clang++ -O3 -c $(llvm-config --cxxflags) source_file.cpp -o obj_code.

Then try linking with this command : clang++ obj_code $(llvm-config --ldflags --libs) -lpthread.

I think linking part doesn't mentioned in the kaleidoscope section. The above solution worked for me.

Turns out the answer was hidden in abi-breaking.h:

/* Allow selectively disabling link-time mismatch checking so that header-only
   ADT content from LLVM can be used without linking libSupport. */
#if !LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING

I'm not sure if I'll need libSupport down the line, but compiling with LLVM_DISABLE_ABI_BREAKING_CHECKS_ENFORCING=1 works for the time being.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!