ld:-bundle和-bitcode_bundle不能一起使用

时间:2015-11-02 06:21:17

标签: ios xcode clang xcode7 bitcode

我在bitcode支持下构建llvm/clang 3.7-fembed-bitcode)。由于错误,某些模块无法链接:

  

ld:-bundle和-bitcode_bundle(Xcode设置ENABLE_BITCODE = YES)   不能一起使用clang:错误:链接器命令失败并退出   代码1(使用-v查看调用)

完整错误输出:

  

链接CXX共享模块../../lib/BugpointPasses.dylib cd   /卷/创见的/ dev / src目录/ llvm_37_ios_any_build /工具/ bugpoint通行证   &安培;&安培; /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   -blle -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:   错误:链接器命令失败,退出代码为1(使用-v查看   调用)make [2]: * [lib / BugpointPasses.dylib]错误1 make [1]:   * [tools / bugpoint-pass / CMakeFiles / BugpointPasses.dir / all]错误2 make:*** [all]错误2

CMake似乎添加了-bundle,因为我无法在CMakeLists.txt中找到它,因为-bitcode_bundle而由SDK添加了-fembed-bitcode

我该如何解决?任何解决方法(例如关闭dylibs建筑,因为我不需要它们)?

1 个答案:

答案 0 :(得分:0)

检查您是否在任何项目中使用Bundle loader: Bundle Loader setting 并将match-O类型设置为Executable而不是Bundle Match-O type setting

希望有所帮助,我遇到了同样的问题并修复了它