]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
On Cygwin/MingW, add SharedLibDir and LLVMToolDir to the library search path, since...
authorDavid Meyer <pdox@google.com>
Sat, 18 Feb 2012 10:03:19 +0000 (10:03 +0000)
committerDavid Meyer <pdox@google.com>
Sat, 18 Feb 2012 10:03:19 +0000 (10:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150876 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules

index 32a97c646c717dbbc3b350cf690f7baeb1c8415e..a1edb6b7dd835c1c4ab0d77721e5e3fe31606821 100644 (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) \