diff options
author | David Meyer <pdox@google.com> | 2012-02-18 10:03:19 +0000 |
---|---|---|
committer | David Meyer <pdox@google.com> | 2012-02-18 10:03:19 +0000 |
commit | 107506f814f42af4a905156e7ce5dd9a2ca6c0c7 (patch) | |
tree | a3163259342e798e327f6e74c17d4e1729b5ad57 | |
parent | a771330366adae132ee10d5b2d2065263724621a (diff) |
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').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150876 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Makefile.rules | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.rules b/Makefile.rules index 32a97c646c..a1edb6b7dd 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -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) \ |