diff options
-rw-r--r-- | compilerplugins/Makefile-clang.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk index 868b5b0c9568..cc2bdc7674c3 100644 --- a/compilerplugins/Makefile-clang.mk +++ b/compilerplugins/Makefile-clang.mk @@ -25,7 +25,8 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g # Clang headers require these. CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti # All include locations needed. -CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem $(CLANGDIR)/tools/clang/include +CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include) \ + -isystem $(CLANGDIR)/tools/clang/include # Clang/LLVM libraries are intentionally not linked in, they are usually built as static libraries, which means the resulting # plugin would be big (even though the clang binary already includes it all) and it'd be necessary to explicitly specify |