summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-18 13:29:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-18 15:32:13 +0200
commit824d9394b529bb1fc521e4a4df8c4e3458ec5641 (patch)
tree349745820eec8e1d34b8e8cbbb2ff53442b0e7a5 /compilerplugins
parent92bded1ca06df4a5f989040c2de825bb314db4a9 (diff)
Properly handle comma in CLANGFLAGS
...which would cause an error that STRINGIFY takes only a single argument. According to chris_wot on IRC, LLVM 6.0 on Ubuntu 18.04.3 LTS output of `llvm --cxxflags` (as is used in configure.ac to determine what ultimately ends up in CLANGFLAGS here) includes e.g. -Wl,--no-keep-files-mapped. Change-Id: Iff570840fe62c2aa2d972431e610a05fe2f6922c Reviewed-on: https://gerrit.libreoffice.org/81037 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/Makefile-clang.mk2
-rw-r--r--compilerplugins/clang/sharedvisitor/analyzer.cxx4
2 files changed, 2 insertions, 4 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 9e6b7fd490b2..8e66b7e5b93c 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -265,7 +265,7 @@ $(CLANGOUTDIR)/sharedvisitor/analyzer$(CLANG_EXE_EXT): $(CLANGINDIR)/sharedvisit
| $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1)
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGINCLUDES) \
- -I$(BUILDDIR)/config_host -DCLANGFLAGS="$(CLANGTOOLDEFS)" \
+ -I$(BUILDDIR)/config_host -DCLANGFLAGS='"$(CLANGTOOLDEFS)"' \
-DLO_CLANG_USE_ANALYZER_PCH=$(LO_CLANG_USE_ANALYZER_PCH) \
-c $< -o $(CLANGOUTDIR)/sharedvisitor/analyzer.o -MMD -MT $@ -MP \
-MF $(CLANGOUTDIR)/sharedvisitor/analyzer.d
diff --git a/compilerplugins/clang/sharedvisitor/analyzer.cxx b/compilerplugins/clang/sharedvisitor/analyzer.cxx
index 4d8e2b2bb763..d0f5d4e7a8a7 100644
--- a/compilerplugins/clang/sharedvisitor/analyzer.cxx
+++ b/compilerplugins/clang/sharedvisitor/analyzer.cxx
@@ -241,10 +241,8 @@ int main(int argc, char** argv)
}
args.push_back(argv[i] + prefixlen);
}
-#define STRINGIFY2(a) #a
-#define STRINGIFY(a) STRINGIFY2(a)
SmallVector< StringRef, 20 > clangflags;
- SplitString( STRINGIFY(CLANGFLAGS), clangflags );
+ SplitString( CLANGFLAGS, clangflags );
args.insert( args.end(), clangflags.begin(), clangflags.end());
args.insert(
args.end(),