[LLVMdev] Transitioning build to cmake
Jeremy Huddleston Sequoia
jeremyhu at apple.com
Wed Jul 24 10:11:39 PDT 2013
I recently took a stab at changing the MacPorts llvm-3.4 port from the configure-based build system to the cmake-based build system.
There are a couple of issues that I still haven't been able to work out yet and would like to know if these are just configuration issues on my side or bugs I should file at bugs.llvm.org:
It looks like the cmake build is missing some runtime libraries. How do I coerce it into building the right ones?
This looks like a bug in cmake. I'm unable to build universal when setting CMAKE_OSX_ARCHITECTURES. cmake errors out because it only set the -arch command line arguments at link time:
Building C object
/usr/bin/clang -Os -o
Linking C executable cmTryCompileExec3905760613
/opt/local/bin/cmake -E cmake_link_script
/usr/bin/clang -Os -Wl,-search_paths_first -Wl,-headerpad_max_install_names
-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 -arch i386
ld: warning: ignoring file
CMakeFiles/cmTryCompileExec3905760613.dir/testCCompiler.c.o, file was built
for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03
0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being
linked (i386): CMakeFiles/cmTryCompileExec3905760613.dir/testCCompiler.c.o
Undefined symbols for architecture i386:
3) Shared library
The build fails if I try to build llvm using BUILD_SHARED_LIBS=ON ... the issue is that when the build tries to use the tools, dyld can't find libllvm-3.4svn.dylib because it's not yet installed.
4) Building clang using installed llvm
It looks like there is some support for building clang against an installed llvm by setting CLANG_PATH_TO_LLVM_BUILD. This fails miserably in part because the installed llvm cmake files reference build time paths, but even after fixing that, there are tons of build failures. I'm guessing this is still a work in progress, but if I should file bugs, please let me know.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4136 bytes
Desc: not available
More information about the llvm-dev