我正在构建llvm/clang 3.7
比特码支持(-fembed-bitcode
)。部分模块因错误无法链接:
ld:-bundle 和 -bitcode_bundle(Xcode 设置 ENABLE_BITCODE=YES)不能一起使用 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
完整的错误输出:
链接 CXX 共享模块 ../../lib/BugpointPasses.dylib cd /Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes && /usr/local/Cellar/cmake/2.8.12.2/bin/cmake - E cmake_link_script CMakeFiles/BugpointPasses.dir/link.txt --verbose=1 /usr/bin/c++ -fembed-bitcode -Os -std=c++11 -stdlib=libc++ -arch arm64 -mios-version-min=8.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -pedantic -Wno-long -long -Wnon-virtual-dtor -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -bundle -Wl,-headerpad_max_install_names -Wl,-dead_strip -Wl,-exported_symbols_list,/Volumes/Transcend/dev/src/llvm_37_ios_any_build/tools/bugpoint-passes/BugpointPasses.exports -Wl,-flat_namespace -Wl,-undefined -Wl,suppress -o ../../lib/BugpointPasses.dylib CMakeFiles/BugpointPasses .dir/TestPasses.cpp.o -Wl,-rpath,@executable_path/../lib ld: -bundle 和 -bitcode_bundle (Xcode 设置 ENABLE_BITCODE=YES) 不能一起使用 clang: error: linker command failed with exit code 1 (使用 -v 查看调用) make[2]:* [lib/BugpointPasses.dylib] 错误 1 make[1]: * [tools/bugpoint-passes/CMakeFiles/BugpointPasses.dir/all] 错误 2 make: *** [all] 错误 2
似乎-bundle
是由 CMake 添加的,因为我无法在 CMakeLists.txt 中找到它,并且-bitcode_bundle
由于-fembed-bitcode
.
我该如何解决?任何解决方法(fe 关闭 dylibs 构建,因为我不需要它们)?