cmake - How to build fat libclang -


i able build llvm , clang on osx following tutorial: http://clang.llvm.org/docs/libastmatcherstutorial.html
use cmake ninja this.

then can find libclang.3.6.dylib under
<path_to_llvm>/build/lib/libclang.3.6.dylib. problem library not fat. mean built x86_64 only. can verify with:
lipo -info libclang.3.6.dylib

this produces:
non-fat file: lib/libclang.3.6.dylib architecture: x86_64

but need i386

i have few questions:

  • how build fat (x86_64 + i386) libclang.dylib , libclang.a ?
  • is possible build these libraries without rebuilding whole llvm, clang, tools etc (whole build takes few hours on machine) ?

additional argument cmake "-dcmake_osx_architectures=x86_64;i386" did trick. guess works osx.

now if run lipo, receive desired output.
lipo -info lib/libclang.3.6.dylib architectures in fat file: lib/libclang.3.6.dylib are: x86_64 i386

but still have recompile whole llvm/clang project (takes few hours)


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -