On Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since shared libraries are placed in 'bin'. (static libraries are still in 'lib').

llvm-svn: 150876
This commit is contained in:
David Meyer 2012-02-18 10:03:19 +00:00
parent fdf598eaf3
commit 4d9547332c
1 changed files with 7 additions and 1 deletions

View File

@ -701,7 +701,13 @@ ifeq ($(HOST_OS),AuroraUX)
CPP.BaseFlags += -include llvm/Support/Solaris.h
endif # !HOST_OS - AuroraUX.
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
# On Windows, SharedLibDir != LibDir. The order is important.
ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
LD.Flags += -L$(SharedLibDir) -L$(LibDir) -L$(LLVMToolDir) -L$(LLVMLibDir)
else
LD.Flags += -L$(LibDir) -L$(LLVMLibDir)
endif
CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
# All -I flags should go here, so that they don't confuse llvm-config.
CPP.Flags += $(sort -I$(PROJ_OBJ_DIR) -I$(PROJ_SRC_DIR) \