X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=CMakeLists.txt;h=f2b3d32614804741c3b761e9d1e931683c9595e4;hb=b3963d680c455407c33168946497840ed63df4b6;hp=b4eac034ae79d69b3561ab685569aaab15023184;hpb=01657f390db6910f4fc5f7ee177c2de04d7b81b4;p=oota-llvm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index b4eac034ae7..f2b3d326148 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -469,6 +469,16 @@ else(UNIX) endif(NOT DEFINED CMAKE_INSTALL_RPATH) endif() +# Work around a broken bfd ld behavior. When linking a binary with a +# foo.so library, it will try to find any library that foo.so uses and +# check its symbols. This is wasteful (the check was done when foo.so +# was created) and can fail since it is not the dynamic linker and +# doesn't know how to handle search paths correctly. +if (UNIX AND NOT APPLE) + set(CMAKE_EXE_LINKER_FLAGS + "${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined") +endif() + set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})