Shared library not building with any symbols

Hi everyone,

I'm running into an issue when building a library that's shared by several
of our IR passes. We have our project structured as directed on the llvm
projects documentation page ( We have
our IR passes and the shared library, CFIUtil, under the project_src/lib
directory (project_src/lib/CFIUtil/). Our shared library has the
following Makefile:

LEVEL = ../../



include $(LEVEL)/Makefile.common

Our build is in project_src/build, and we have configured it according to
documentation. When running make in the build directory, we get the
following warning:

llvm[2]: Linking Release+Debug+Asserts Shared Library libCFIUtil.dylib
llvm[2]: Building Release+Debug+Asserts Archive Library libCFIUtil.a
ranlib: file:
has no symbols
ranlib: warning for library:
the table of contents is empty (no object file members in the library
define global symbols)
llvm[2]: Compiling main.c for Release+Debug+Asserts build

Which leads to the following error when running our IR passes:

dyld: lazy symbol binding failed: Symbol not found:
  Referenced from: ../build/Release+Debug+Asserts/lib/LLVMSuperGraph.dylib
  Expected in: flat namespace

We found the following discussion of a similar issue:
However making the same changes to our makefiles didn't seem to do
anything. Any help debugging this issue is greatly appreciated. I'm
running on Mac OSX version 10.8.5, and I have no problems building/running
IR passes that do not use a shared library.

Oulin Yao