[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2023-10-09 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 646981459df7ba075069320bcaba4dd983777f4f
Author: Stephan Bergmann 
AuthorDate: Mon Oct 9 16:30:10 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 9 23:25:10 2023 +0200

Add -rpath when building analyzer executable on macOS

...as at least with LLVM 18 trunk, the generated executable references
@rpath/libclang-cpp.dylib but didn't actually contain an LC_RPATH

Change-Id: Ida643903aa4566853ea9541553f0dfc9c3243d4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157706
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 7d993433c030..16a75e44b403 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -260,7 +260,9 @@ $(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: 
$(SHARED_SOURCE_INFOS) $(CLANGOU
 # and it can also cause trouble with finding the proper headers.
 CLANGTOOLDEFS = $(filter-out -stdlib=%,$(CLANGDEFS) -I$(CLANGSYSINCLUDE))
 CLANGTOOLDEFS += -w
-ifneq ($(filter-out MACOSX WNT,$(OS)),)
+ifneq ($(filter MACOSX,$(OS)),)
+CLANGTOOLLIBS += -Wl,-rpath,$(CLANGLIBDIR)
+else ifneq ($(filter-out WNT,$(OS)),)
 ifneq ($(CLANGDIR),/usr)
 # Help the generator find Clang shared libs, if Clang is built so and 
installed in a non-standard prefix.
 CLANGTOOLLIBS += -Wl,--rpath,$(CLANGLIBDIR)


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2021-01-20 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit db1561f0510a179045ccea857f9386af83af729f
Author: Stephan Bergmann 
AuthorDate: Wed Jan 20 14:24:19 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Jan 20 22:17:35 2021 +0100

Build compilerplugings code with -fvisibility-inlines-hidden

Even though `llvm-config --cxxflags` does not reflect it, LLVM generally 
uses
-fvisibility-inlines-hidden on Unix-like platforms at least since 
"[CMake] Support -fvisibility-inlines-hidden when LLVM_ENABLE_PIC=Off" 
debuting
in release/3.8.x.

At least with my build on macOS 11.1 ARM64 against recent LLVM 12 trunk, 
that
caused a mismatch between

> $ nm -m compilerplugins/clang/sharedvisitor/analyzer.o | grep 
__ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc
> 00028038 (__DATA,__data) weak external 
__ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc

and

> $ nm -m ~/llvm/inst/lib/libclangAST.a\(JSONNodeDumper.cpp.o\) | grep 
__ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc
> 0001ccf0 (__DATA,__data) weak private external 
__ZGVZNK5clang24TemplateTemplateParmDecl18getDefaultArgumentEvE7NoneLoc

etc., causing (albeit harmless) warnings

> [GEN] compilerplugins/clang/sharedvisitor/analyzer
> ld: warning: direct access in function 
'clang::JSONNodeDumper::VisitTemplateTemplateParmDecl(clang::TemplateTemplateParmDecl
 const*)' from file '~/llvm/inst/lib/libclangAST.a(JSONNodeDumper.cpp.o)' to 
global weak symbol 'guard variable for 
clang::TemplateTemplateParmDecl::getDefaultArgument() const::NoneLoc' from file 
'compilerplugins/clang/sharedvisitor/analyzer.o' means the weak symbol cannot 
be overridden at runtime. This was likely caused by different translation units 
being compiled with different visibility settings.
[...]

-fvisibility-inline-hidden is presumably supported by all
$(COMPILER_PLUGINS_CXX) used on non-Windows platforms in the wild, so lets 
be
bold and add it unconditionally.

Change-Id: I0d405b4f57066baa098977e65e5ba4a3a47575c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109712
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 9d6b46019344..7d993433c030 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -26,7 +26,7 @@ else
 CLANGCXXFLAGS+=/DEBUG /Od
 endif
 else # WNT
-CLANGCXXFLAGS=-Wall -Wextra -Wundef
+CLANGCXXFLAGS=-Wall -Wextra -Wundef -fvisibility-inlines-hidden
 ifeq ($(CLANGDEBUG),)
 CLANGCXXFLAGS+=-O2
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2020-02-16 Thread Andrea Gelmini (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4caa7b790cf99eebbe47fc2e6a56124c42f1f3fc
Author: Andrea Gelmini 
AuthorDate: Fri Feb 14 22:34:33 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Feb 17 04:08:22 2020 +0100

Fix typo

Change-Id: I9ec38d517d176ecd8dad074f3d96769f85eec311
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88745
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 266919cf02b8..65cfa67cb1ec 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -103,7 +103,7 @@ else
 CLANGWERROR := -Werror
 # When COMPILER_PLUGINS_CXXFLAGS (obtained via `llvm-config --cxxflags`) 
contains options like
 # -Wno-maybe-uninitialized that are targeting GCC (when LLVM was actually 
built with GCC), and
-# COMPILER_PLUGINS_CXX (defaulting to CXX) deonotes a Clang that does not 
understand those options,
+# COMPILER_PLUGINS_CXX (defaulting to CXX) denotes a Clang that does not 
understand those options,
 # it fails with -Werror,-Wunknown-warning-option, so we need 
-Wno-unknown-warning-option (but which
 # GCC does not understand) at least with -Werror:
 ifeq ($(COMPILER_PLUGINS_COM_IS_CLANG),TRUE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac

2020-02-14 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |8 
 config_host.mk.in |1 +
 configure.ac  |   14 ++
 3 files changed, 23 insertions(+)

New commits:
commit bce14e97a6dad7686643d094995433c77e4aee7e
Author: Stephan Bergmann 
AuthorDate: Fri Feb 14 16:28:53 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Feb 14 19:24:32 2020 +0100

Prevent -Werror,-Wunknown-warning-option when building compilerplugins

...with --enable-werror (seen it fail with a local build against a locally
built Clang 5.0.2).

(bin/gen-boost-headers faces a similar dilemma with Clang needing to silence
-Wunknown-warning-option and GCC failing upon the silencing incantation.  
There,
we were able to hack around that with a preceding

  #pragma GCC diagnostic ignored "-Wpragmas"

Here, the easiest approach appears to be a new COMPILER_PLUGINS_COM_IS_CLANG
analoguous to the existing COM_IS_CLANG.)

Change-Id: I9036261fdd238c8a020a1d88b4e75fd444f9e030
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88725
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 543ec27aad44..266919cf02b8 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -101,6 +101,14 @@ CLANGWERROR :=
 #TODO: /WX
 else
 CLANGWERROR := -Werror
+# When COMPILER_PLUGINS_CXXFLAGS (obtained via `llvm-config --cxxflags`) 
contains options like
+# -Wno-maybe-uninitialized that are targeting GCC (when LLVM was actually 
built with GCC), and
+# COMPILER_PLUGINS_CXX (defaulting to CXX) deonotes a Clang that does not 
understand those options,
+# it fails with -Werror,-Wunknown-warning-option, so we need 
-Wno-unknown-warning-option (but which
+# GCC does not understand) at least with -Werror:
+ifeq ($(COMPILER_PLUGINS_COM_IS_CLANG),TRUE)
+CLANGWERROR += -Wno-unknown-warning-option
+endif
 endif
 endif
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 9dd4b72c421c..ef612734da3c 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -78,6 +78,7 @@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@
 export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@
 export COMPATH=@COMPATH@
 export COMPILER_PLUGINS=@COMPILER_PLUGINS@
+export COMPILER_PLUGINS_COM_IS_CLANG=@COMPILER_PLUGINS_COM_IS_CLANG@
 export COMPILER_PLUGINS_CXX=@COMPILER_PLUGINS_CXX@
 export COMPILER_PLUGINS_CXXFLAGS=@COMPILER_PLUGINS_CXXFLAGS@
 export COMPILER_PLUGINS_CXX_LINKFLAGS=@COMPILER_PLUGINS_CXX_LINKFLAGS@
diff --git a/configure.ac b/configure.ac
index 3fa8fc760e3f..e186f6d3eb73 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7218,6 +7218,7 @@ if test "$COM_IS_CLANG" != "TRUE"; then
 fi
 fi
 
+COMPILER_PLUGINS_COM_IS_CLANG=
 if test "$COM_IS_CLANG" = "TRUE"; then
 if test -n "$enable_compiler_plugins"; then
 compiler_plugins="$enable_compiler_plugins"
@@ -7336,6 +7337,18 @@ if test "$COM_IS_CLANG" = "TRUE"; then
 LDFLAGS=$save_LDFLAGS
 LIBS="$save_LIBS"
 AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether the compiler for building compilerplugins is 
actually Clang])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+#ifndef __clang__
+you lose
+#endif
+int foo=42;
+]])],
+[AC_MSG_RESULT([yes])
+ COMPILER_PLUGINS_COM_IS_CLANG=TRUE],
+[AC_MSG_RESULT([no])])
+AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
 fi
 else
 if test "$enable_compiler_plugins" = "yes"; then
@@ -7343,6 +7356,7 @@ else
 fi
 fi
 AC_SUBST(COMPILER_PLUGINS)
+AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
 AC_SUBST(COMPILER_PLUGINS_CXX)
 AC_SUBST(COMPILER_PLUGINS_CXXFLAGS)
 AC_SUBST(COMPILER_PLUGINS_CXX_LINKFLAGS)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-11-25 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 62625aa76bb840c8663452383abe506d6ce4faa4
Author: Luboš Luňák 
AuthorDate: Mon Nov 25 12:06:38 2019 +0100
Commit: Luboš Luňák 
CommitDate: Mon Nov 25 21:57:13 2019 +0100

use -Xclang -fno-pch-timestamp also for Clang PCH in compilerplugins

We already use that normally, the build system should generally take
care of this by gmake dependencies. One exception is system headers,
but those usually do not really change even if their timestamps do,
so this should prevent Clang from giving an error about this after
system headers update (which should be harmless, and if it isn't
then I suppose either something else such as compiler upgrade
should trigger a rebuild, or cleaning needs to be done manually).

Change-Id: I60581c0d2d3233aadc60e1c90bd62cb9ad684ba2
Reviewed-on: https://gerrit.libreoffice.org/83662
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 0965c74636fc..29bc89c6b2a2 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -112,6 +112,7 @@ ifneq ($(OS),WNT)
 # Currently only Clang PCH is supported (which should usually be the case, as 
Clang is usually self-built).
 ifneq ($(findstring clang,$(COMPILER_PLUGINS_CXX)),)
 LO_CLANG_USE_PCH=1
+LO_CLANG_PCH_FLAGS:=-Xclang -fno-pch-timestamp
 endif
 endif
 endif
@@ -326,6 +327,7 @@ $(CLANGOUTDIR)/clang.pch: 
$(CLANGINDIR)/precompiled_clang.hxx \
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
$(QUIET)$(COMPILER_PLUGINS_CXX) -x c++-header $(CLANGDEFS) 
$(CLANGCXXFLAGS) $(CLANGWERROR) \
 $(CLANGINCLUDES) -I$(BUILDDIR)/config_host -I$(CLANGINDIR) 
-DPCH_LEVEL=$(gb_ENABLE_PCH) \
+$(LO_CLANG_PCH_FLAGS) \
 -fPIC -c $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d
 endif
 -include $(CLANGOUTDIR)/clang.pch.d
@@ -343,7 +345,7 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: 
$(CLANGINDIR)/sharedvisitor/precompiled_
 | $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
$(QUIET)$(CLANGDIR)/bin/clang -x c++-header 
$(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \
-$(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \
+$(LO_CLANG_PCH_FLAGS) $(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ 
-MMD -MT $@ -MP \
 -MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
 
 -include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-10-21 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2fa1d68984e28a2c9d54250d16cecf6e719b4547
Author: Stephan Bergmann 
AuthorDate: Fri Oct 18 17:40:42 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Oct 21 12:55:53 2019 +0200

Don't invoke the linker when generating pch files

When `llvm-config --cxxflags` outputs -Wl,... options (as has been 
discussed at
824d9394b529bb1fc521e4a4df8c4e3458ec5641 "Properly handle comma in 
CLANGFLAGS",
and which end up on the compiler command lines here), Clang failed with an 
error
"cannot specify -o when generating multiple output files" when generating
sharedvisitor/clang.pch.

Change-Id: I200ebd152f5a524ce7ecdd2f25c34bbaa634f515
Reviewed-on: https://gerrit.libreoffice.org/81065
Tested-by: Jenkins
Reviewed-by: Chris Sherlock 
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 8e66b7e5b93c..0965c74636fc 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -326,7 +326,7 @@ $(CLANGOUTDIR)/clang.pch: 
$(CLANGINDIR)/precompiled_clang.hxx \
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
$(QUIET)$(COMPILER_PLUGINS_CXX) -x c++-header $(CLANGDEFS) 
$(CLANGCXXFLAGS) $(CLANGWERROR) \
 $(CLANGINCLUDES) -I$(BUILDDIR)/config_host -I$(CLANGINDIR) 
-DPCH_LEVEL=$(gb_ENABLE_PCH) \
--fPIC $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d
+-fPIC -c $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d
 endif
 -include $(CLANGOUTDIR)/clang.pch.d
 
@@ -343,7 +343,7 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: 
$(CLANGINDIR)/sharedvisitor/precompiled_
 | $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
$(QUIET)$(CLANGDIR)/bin/clang -x c++-header 
$(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \
-$(COMPILER_PLUGINS_TOOLING_ARGS) $< -o $@ -MMD -MT $@ -MP \
+$(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \
 -MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
 
 -include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-10-09 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a73cb32c7285343cbb30b4647e8e7e448eebbb02
Author: Luboš Luňák 
AuthorDate: Wed Oct 9 16:16:28 2019 +0200
Commit: Luboš Luňák 
CommitDate: Wed Oct 9 16:16:51 2019 +0200

fix compilerplugins makefile typo

Change-Id: Iff01d234746221a775c7b4f5742ae508691a90d0

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index eb1ae04d0bf4..c6b3b208c7e0 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -307,7 +307,7 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: 
$(CLANGINDIR)/sharedvisitor/precompiled_
 $(COMPILER_PLUGINS_TOOLING_ARGS) $< -o $@ -MMD -MT $@ -MP \
 -MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
 
--include $(CLANGOUTDIR)/sharedvisitor/clan.pch.d
+-include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d
 
 else
 $(CLANGOUTDIR)/sharedvisitor/clang.pch:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-09-20 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit db123abade41a54d34add4fae46b769cd863de7f
Author: Luboš Luňák 
AuthorDate: Thu Sep 19 16:54:25 2019 +0200
Commit: Luboš Luňák 
CommitDate: Fri Sep 20 10:48:02 2019 +0200

rebuild sharedvisitor.cxx if any of its sources disappears

Testcase: Remove any reference to LO_CLANG_SHARED_PLUGINS from e.g.
blockblock.cxx, sharedvisitor.cxx should get regenerated.

Change-Id: Iddff3cf41c223cfdf161060d29bde9df1df7b702
Reviewed-on: https://gerrit.libreoffice.org/79194
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index ac23edf6cb2b..1a2ceef369df 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -275,6 +275,28 @@ $(CLANGOUTDIR)/sharedvisitor:
 -include $(CLANGOUTDIR)/sharedvisitor/analyzer.d
 -include $(CLANGOUTDIR)/sharedvisitor/generator.d
 # TODO WNT version
+
+# Remember the sources that are shared and if they have changed, force 
sharedvisitor.cxx generating.
+# Duplicated from CLANGSRCCHANGED above.
+CLANGSRCSHAREDCHANGED= \
+$(shell mkdir -p $(CLANGOUTDIR) ; \
+echo $(SHARED_SOURCES) | sort > 
$(CLANGOUTDIR)/sources-shared-new.txt; \
+if diff $(CLANGOUTDIR)/sources-shared.txt 
$(CLANGOUTDIR)/sources-shared-new.txt >/dev/null 2>/dev/null; then \
+echo 0; \
+else \
+mv $(CLANGOUTDIR)/sources-shared-new.txt 
$(CLANGOUTDIR)/sources-shared.txt; \
+echo 1; \
+fi; \
+)
+ifeq ($(CLANGSRCSHAREDCHANGED),1)
+.PHONY: CLANGFORCE
+CLANGFORCE:
+$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: CLANGFORCE
+endif
+# Make sharedvisitor.cxx also explicitly depend on the sources list, to force 
update in case CLANGSRCSHAREDCHANGED was e.g. during 'make clean'.
+$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: 
$(CLANGOUTDIR)/sources-shared.txt
+$(CLANGOUTDIR)/sources-shared.txt:
+   touch $@
 endif
 
 ifdef LO_CLANG_USE_ANALYZER_PCH
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-09-17 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 8083ccef3759b2d838df86965c0d1b42f9098848
Author: Stephan Bergmann 
AuthorDate: Mon Sep 16 23:16:05 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Sep 17 09:30:41 2019 +0200

Fix compilerplugins for macOS again

...in the same spirit as how COMPILER_PLUGINS_TOOLING_ARGS had been 
introduced
with ad7e2af4ed0c11f8571374fbb40d38b38c27959c "Allow to pass additional 
options
into generator's clang::tooling":  For one,
ceb26770b3d1c5c2ffaf73f8f589c5e169e6db06 "split clangplugins sharedvisitor
generator into two steps" should have passed COMPILER_PLUGINS_TOOLING_ARGS 
only
into the analyzer and not into the generator executable, while for another, 
at
least my local build failed with

> [PCH] compilerplugins/clang/sharedvisitor/clang.pch
> In file included from 
/Users/stephan/Software/lo/core/compilerplugins/clang/sharedvisitor/precompiled_clang.hxx:12:
> In file included from 
/Users/stephan/Software/lo/core/compilerplugins/clang/sharedvisitor/../plugin.hxx:15:
> In file included from 
/Users/stephan/Software/llvm/inst/include/clang/AST/ASTContext.h:18:
> In file included from 
/Users/stephan/Software/llvm/inst/include/clang/AST/ASTTypeTraits.h:19:
> In file included from 
/Users/stephan/Software/llvm/inst/include/clang/AST/Decl.h:16:
> In file included from 
/Users/stephan/Software/llvm/inst/include/clang/AST/APValue.h:16:
> In file included from 
/Users/stephan/Software/llvm/inst/include/clang/Basic/FixedPoint.h:19:
> In file included from 
/Users/stephan/Software/llvm/inst/include/llvm/ADT/APSInt.h:17:
> In file included from 
/Users/stephan/Software/llvm/inst/include/llvm/ADT/APInt.h:18:
> In file included from 
/Users/stephan/Software/llvm/inst/include/llvm/Support/Compiler.h:21:
> In file included from 
/Users/stephan/Software/llvm/inst/bin/../include/c++/v1/new:90:
> In file included from 
/Users/stephan/Software/llvm/inst/bin/../include/c++/v1/exception:81:
> In file included from 
/Users/stephan/Software/llvm/inst/bin/../include/c++/v1/cstdlib:85:
> /Users/stephan/Software/llvm/inst/bin/../include/c++/v1/stdlib.h:97:15: 
fatal error: 'stdlib.h' file not found
> #include_next 
>   ^~

after dc79dc76f18148296ae18ed7251cf61505e25d44 "make clangplugin analyzer 
use internally a PCH to speed things up".

Change-Id: I4aa925049dbc145c672cad7cab2043a0f13780fa
Reviewed-on: https://gerrit.libreoffice.org/79028
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index f2ed9212948d..ac23edf6cb2b 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -229,7 +229,7 @@ $(CLANGOUTDIR)/sharedvisitor/%.plugininfo: 
$(CLANGINDIR)/%.cxx \
 $(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: $(SHARED_SOURCE_INFOS) 
$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT)
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1)
$(QUIET)$(ICECREAM_RUN) 
$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) \
-$(COMPILER_PLUGINS_TOOLING_ARGS:%=-arg=%) $(SHARED_SOURCE_INFOS) > $@
+$(SHARED_SOURCE_INFOS) > $@
 
 CLANGTOOLLIBS = -lclangTooling -lclangDriver -lclangFrontend -lclangParse 
-lclangSema -lclangEdit -lclangAnalysis \
 -lclangAST -lclangLex -lclangSerialization -lclangBasic $(shell 
$(LLVMCONFIG) --ldflags --libs --system-libs)
@@ -287,7 +287,8 @@ $(CLANGOUTDIR)/sharedvisitor/clang.pch: 
$(CLANGINDIR)/sharedvisitor/precompiled_
 $(CLANGOUTDIR)/clang-timestamp \
 | $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1)
-   $(QUIET)$(CLANGDIR)/bin/clang -x c++-header 
$(LO_CLANG_ANALYZER_PCH_CXXFLAGS) $< -o $@
+   $(QUIET)$(CLANGDIR)/bin/clang -x c++-header 
$(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \
+$(COMPILER_PLUGINS_TOOLING_ARGS) $< -o $@
 else
 $(CLANGOUTDIR)/sharedvisitor/clang.pch:
touch $@
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-07-16 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c62360e4cbb605020f9b6b0d40fcd60bca3994b7
Author: Stephan Bergmann 
AuthorDate: Tue Jul 16 09:20:50 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jul 16 14:01:14 2019 +0200

macOS ld doesn't know --rpath

Change-Id: I4ebef2f15c409805adcd16916a9137b94e4ee535
Reviewed-on: https://gerrit.libreoffice.org/75677
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 050c206e121d..d2c07fd06dba 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -208,7 +208,7 @@ CLANGTOOLLIBS = -lclangTooling -lclangDriver 
-lclangFrontend -lclangParse -lclan
 -lclangAST -lclangLex -lclangSerialization -lclangBasic $(shell 
$(LLVMCONFIG) --ldflags --libs --system-libs)
 # Path to the clang system headers (no idea if there's a better way to get it).
 CLANGTOOLDEFS = -DCLANGSYSINCLUDE=$(shell $(LLVMCONFIG) 
--libdir)/clang/$(shell $(LLVMCONFIG) --version | sed 's/svn//')/include
-ifneq ($(OS),WNT)
+ifneq ($(filter-out MACOSX WNT,$(OS)),)
 ifneq ($(CLANGDIR),/usr)
 # Help the generator find Clang shared libs, if Clang is built so and 
installed in a non-standard prefix.
 CLANGTOOLLIBS += -Wl,--rpath,$(shell $(LLVMCONFIG) --libdir)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-06-25 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |   22 ++
 1 file changed, 18 insertions(+), 4 deletions(-)

New commits:
commit 4139e0edebe42844054b1120778a54b2b2325a49
Author: Luboš Luňák 
AuthorDate: Tue Jun 25 09:05:26 2019 +0200
Commit: Luboš Luňák 
CommitDate: Tue Jun 25 19:46:58 2019 +0200

do not use -g unconditionally for building the clang plugin

The generated files are ~700MiB here, compared to ~85MiB without.

Change-Id: I76bafc59ff89fd7eb8ffbc4b9ad79bc63da8f064
Reviewed-on: https://gerrit.libreoffice.org/74678
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index ce3ab90a0ec2..263fd949979f 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -8,8 +8,10 @@
 
 # Make sure variables in this Makefile do not conflict with other variables 
(e.g. from gbuild).
 
-# Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin); you
-# may occasionally want to override these:
+# Set to 1 if you need to debug the plugin).
+CLANGDEBUG=
+
+# Compile flags, you may occasionally want to override these:
 ifeq ($(OS),WNT)
 # See LLVM's cmake/modules/AddLLVM.cmake and LLVM build's
 # tools/llvm-config/BuildVariables.inc:
@@ -17,9 +19,19 @@ ifeq ($(OS),WNT)
 #   "LLVM_ATTRIBUTE_ALWAYS_INLINE inline" in various LLVM include files.
 # * Ignore "warning C4577: 'noexcept' used with no exception handling mode
 #   specified; termination on exception is not guaranteed. Specify /EHsc".
-CLANGCXXFLAGS=/nologo /D_HAS_EXCEPTIONS=0 /wd4141 /wd4577 /O2 /Oi /EHs-c- /GR-
+CLANGCXXFLAGS=/nologo /D_HAS_EXCEPTIONS=0 /wd4141 /wd4577 /EHs-c- /GR-
+ifeq ($(CLANGDEBUG),)
+CLANGCXXFLAGS+=/O2 /Oi
+else
+CLANGCXXFLAGS+=/DEBUG
+endif
+else # WNT
+CLANGCXXFLAGS=-Wall -Wextra -Wundef
+ifeq ($(CLANGDEBUG),)
+CLANGCXXFLAGS+=-O2
 else
-CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
+CLANGCXXFLAGS+=-g
+endif
 endif
 
 # Whether to make plugins use one shared ASTRecursiveVisitor (plugins run 
faster).
@@ -73,9 +85,11 @@ ifdef LO_CLANG_SHARED_PLUGINS
 CLANGCXXFLAGS+=-DLO_CLANG_SHARED_PLUGINS
 endif
 
+ifneq ($(CLANGDEBUG),)
 ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
 CLANGCXXFLAGS+=-gsplit-dwarf
 endif
+endif
 
 QUIET=$(if $(verbose),,@)
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-05-27 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d6d8099b520be23b823c784276dfbdb01e9db3c8
Author: Luboš Luňák 
AuthorDate: Sun May 26 16:08:14 2019 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 27 13:04:42 2019 +0200

sharedvisitor generator should also be rebuilt if clang changes

Change-Id: I7602974ed6f4969ec9f79504bdb72758a747d39a
Reviewed-on: https://gerrit.libreoffice.org/72982
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 0a6f81e10d21..7cdf407bd0f0 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -203,6 +203,8 @@ $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): 
$(CLANGINDIR)/sharedvisi
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) 
$(CLANGOUTDIR)/sharedvisitor/generator.o \
 -o $@ $(CLANGTOOLLIBS)
 
+$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): 
$(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
+
 $(CLANGOUTDIR)/sharedvisitor:
mkdir -p $(CLANGOUTDIR)/sharedvisitor
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-05-23 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit b2fbbd196401b3610cf06c669b6e9add12c9a19b
Author: Stephan Bergmann 
AuthorDate: Thu May 23 14:11:39 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 23 20:28:50 2019 +0200

Avoid putting generator.dwo in current working dir

At least some versions of GCC put the -gsplit-dwarf .dwo file in cwd when
compiling and linking is done together in one compiler invocation, see
 "-gsplit-dwarf leaves
behind .dwo file in cwd".

Change-Id: I1b418e400a3e8107997fbbfd7f87ef3ac9fbbd28
Reviewed-on: https://gerrit.libreoffice.org/72841
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 3b19d1eafdd2..0a6f81e10d21 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -198,7 +198,10 @@ $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): 
$(CLANGINDIR)/sharedvisi
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1)
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) $(CLANGTOOLDEFS) $(CLANGINCLUDES) \
 -DCLANGDIR=$(CLANGDIR) -DBUILDDIR=$(BUILDDIR) 
-I$(BUILDDIR)/config_host \
-$< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/sharedvisitor/generator.d 
$(CLANGTOOLLIBS)
+-c $< -o $(CLANGOUTDIR)/sharedvisitor/generator.o -MMD -MT $@ -MP \
+-MF $(CLANGOUTDIR)/sharedvisitor/generator.d
+   $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) 
$(CLANGOUTDIR)/sharedvisitor/generator.o \
+-o $@ $(CLANGTOOLLIBS)
 
 $(CLANGOUTDIR)/sharedvisitor:
mkdir -p $(CLANGOUTDIR)/sharedvisitor
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-05-20 Thread Luboš Luňák (via logerrit)
 compilerplugins/Makefile-clang.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit 092da974f180e6f166c2e5662ce11db72351700b
Author: Luboš Luňák 
AuthorDate: Mon May 20 12:13:24 2019 +0200
Commit: Luboš Luňák 
CommitDate: Mon May 20 13:52:41 2019 +0200

use -gsplit-dwarf also for compilerplugins if possible

~350MiB easily saved.

Change-Id: I9a91894cf4df7bc06d472795e564148fe8342995
Reviewed-on: https://gerrit.libreoffice.org/72588
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index c6d57320c0ee..3b19d1eafdd2 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -73,6 +73,10 @@ ifdef LO_CLANG_SHARED_PLUGINS
 CLANGCXXFLAGS+=-DLO_CLANG_SHARED_PLUGINS
 endif
 
+ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
+CLANGCXXFLAGS+=-gsplit-dwarf
+endif
+
 QUIET=$(if $(verbose),,@)
 
 ifneq ($(ENABLE_WERROR),)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-03-27 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit b5b36745184cf04f469731323580bc27296dc912
Author: Stephan Bergmann 
AuthorDate: Wed Mar 27 11:08:02 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Mar 27 14:18:12 2019 +0100

Disable LO_CLANG_SHARED_PLUGINS on Windows for now

...needs some more modifications to make it work with clang-cl

Change-Id: I6e2f8c9651b0532e21ec5acf94e8bae0a0f8f06e
Reviewed-on: https://gerrit.libreoffice.org/69808
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index a0a7e2155543..c6d57320c0ee 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -25,6 +25,10 @@ endif
 # Whether to make plugins use one shared ASTRecursiveVisitor (plugins run 
faster).
 # By default enabled, disable if you work on an affected plugin (re-generating 
takes time).
 LO_CLANG_SHARED_PLUGINS=1
+#TODO:
+ifeq ($(OS),WNT)
+LO_CLANG_SHARED_PLUGINS=
+endif
 
 # The uninteresting rest.
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-03-24 Thread Stephan Bergmann (via logerrit)
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 876f23915ab39d317207c191f378c53e33059a0d
Author: Stephan Bergmann 
AuthorDate: Fri Mar 22 23:07:52 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Mar 23 20:30:12 2019 +0100

Consistently make generator invocation $(QUIET) too

Change-Id: I5251f130aafdebdb4698ef4513b1dcf9f3bdf454
Reviewed-on: https://gerrit.libreoffice.org/69571
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index f342ec01b5f9..a0a7e2155543 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -175,7 +175,7 @@ ifdef LO_CLANG_SHARED_PLUGINS
 $(CLANGINDIR)/sharedvisitor/sharedvisitor.cxx: $(shell grep -l 
"LO_CLANG_SHARED_PLUGINS" $(CLANGINDIR)/*.cxx)
 $(CLANGINDIR)/sharedvisitor/sharedvisitor.cxx: 
$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT)
$(call gb_Output_announce,$(subst $(SRCDIR)/,,$@),$(true),GEN,1)
-   $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) \
+   $(QUIET)$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) \
 $(COMPILER_PLUGINS_TOOLING_ARGS:%=-arg=%) \
 $(shell grep -l "LO_CLANG_SHARED_PLUGINS" $(CLANGINDIR)/*.cxx) \
 > $(CLANGINDIR)/sharedvisitor/sharedvisitor.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-03-18 Thread Libreoffice Gerrit user
 compilerplugins/Makefile-clang.mk |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit cc0b0f94b1888709f45bf63b98761a471f73f041
Author: Stephan Bergmann 
AuthorDate: Fri Mar 15 15:16:34 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Mar 18 21:24:45 2019 +0100

It is building the generator exe that depends on 
$(CLANGOUTDIR)/sharedvisitor

...or else

  -MF $(CLANGOUTDIR)/sharedvisitor/generator.d

in the command line for building the generator exe could produce a failure
because the dir does not exist yet.  (The dependency of 
compilerplugins-build on
$(CLANGOUTDIR)/sharedvisitor had been added with
adb08e892b37ea9e155abbdee4e0c9951a1d163b "make (some) clang plugins share 
the
same RecursiveASTVisitor" for reasons that are not clear to me.)

Change-Id: I124b95be5e8ba36dc5d7502208c61ccf045516f5
Reviewed-on: https://gerrit.libreoffice.org/69307
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index af61c14e1664..0d73bebb8daf 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -183,14 +183,13 @@ CLANGTOOLLIBS = -lclangTooling -lclangDriver 
-lclangFrontend -lclangParse -lclan
 # Path to the clang system headers (no idea if there's a better way to get it).
 CLANGTOOLDEFS = -DCLANGSYSINCLUDE=$(shell $(LLVMCONFIG) 
--libdir)/clang/$(shell $(LLVMCONFIG) --version | sed 's/svn//')/include
 
-$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): 
$(CLANGINDIR)/sharedvisitor/generator.cxx
+$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): 
$(CLANGINDIR)/sharedvisitor/generator.cxx \
+| $(CLANGOUTDIR)/sharedvisitor
$(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1)
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) $(CLANGTOOLDEFS) $(CLANGINCLUDES) \
 -DCLANGDIR=$(CLANGDIR) -DBUILDDIR=$(BUILDDIR) 
-I$(BUILDDIR)/config_host \
 $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/sharedvisitor/generator.d 
$(CLANGTOOLLIBS)
 
-compilerplugins-build: $(CLANGOUTDIR)/sharedvisitor
-
 $(CLANGOUTDIR)/sharedvisitor:
mkdir -p $(CLANGOUTDIR)/sharedvisitor
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-02-18 Thread Libreoffice Gerrit user
 compilerplugins/Makefile-clang.mk |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 051d0ccc16954ec423f91ac148e34ce3bff7aca4
Author: Luboš Luňák 
AuthorDate: Mon Feb 18 15:14:15 2019 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 18 17:10:42 2019 +0100

make Makefile-clang.mk also use gb_Output_announce

So that the output is consistent, even though the actual build handling
is different.

Change-Id: I460dfe4c2ac74515cc1b598d47e119eb249b8277
Reviewed-on: https://gerrit.libreoffice.org/67972
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 91a811a74eda..36784fbb4f14 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -24,6 +24,9 @@ endif
 
 # The uninteresting rest.
 
+include $(SRCDIR)/solenv/gbuild/gbuild.mk
+include $(SRCDIR)/solenv/gbuild/Output.mk
+
 CLANG_COMMA :=,
 
 ifeq ($(OS),WNT)
@@ -106,7 +109,7 @@ ifeq ($(OS),WNT)
 
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk 
$(CLANGOUTDIR)/clang-timestamp
-   @echo [build CXX] $(subst $(SRCDIR)/,,$(2))
+   $$(call gb_Output_announce,$(subst $(SRCDIR)/,,$(2)),$(true),CXX,3)
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) \
 $(CLANGINCLUDES) /I$(BUILDDIR)/config_host $(2) /MD \
 /c /Fo: $(3)
@@ -121,7 +124,7 @@ else
 
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk 
$(CLANGOUTDIR)/clang-timestamp
-   @echo [build CXX] $(subst $(SRCDIR)/,,$(2))
+   $$(call gb_Output_announce,$(subst $(SRCDIR)/,,$(2)),$(true),CXX,3)
$(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC -c -o $(3) 
-MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
 
 -include $(CLANGOUTDIR)/$(1).d
@@ -135,7 +138,7 @@ endif
 $(foreach src, $(CLANGSRC), $(eval $(call 
clangbuildsrc,$(src),$(CLANGINDIR)/$(src),$(CLANGOUTDIR)/$(src:.cxx=.o
 
 $(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(CLANGOBJS)
-   @echo [build LNK] $(subst $(BUILDDIR)/,,$@)
+   $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),LNK,4)
 ifeq ($(OS),WNT)
$(QUIET)$(COMPILER_PLUGINS_CXX) /LD $(CLANGOBJS) /Fe: $@ 
$(CLANGLIBDIR)/clang.lib \
 mincore.lib version.lib /link $(COMPILER_PLUGINS_CXX_LINKFLAGS)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2019-02-18 Thread Libreoffice Gerrit user
 compilerplugins/Makefile-clang.mk |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit af8deb6b21b4e6888267c7fe385a102e2e7eba77
Author: Luboš Luňák 
AuthorDate: Mon Feb 18 15:02:29 2019 +0100
Commit: Luboš Luňák 
CommitDate: Mon Feb 18 17:10:17 2019 +0100

make uninteresting code in clang's makefile to the uninteresting part

Change-Id: I235284c7198aa2a295b4d81ff2f8e9ca554a4174
Reviewed-on: https://gerrit.libreoffice.org/67971
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index aad53a90ca5c..91a811a74eda 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -8,16 +8,6 @@
 
 # Make sure variables in this Makefile do not conflict with other variables 
(e.g. from gbuild).
 
-CLANG_COMMA :=,
-
-ifeq ($(OS),WNT)
-CLANG_DL_EXT = .dll
-CLANG_EXE_EXT = .exe
-else
-CLANG_DL_EXT = .so
-CLANG_EXE_EXT =
-endif
-
 # Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin); you
 # may occasionally want to override these:
 ifeq ($(OS),WNT)
@@ -34,6 +24,16 @@ endif
 
 # The uninteresting rest.
 
+CLANG_COMMA :=,
+
+ifeq ($(OS),WNT)
+CLANG_DL_EXT = .dll
+CLANG_EXE_EXT = .exe
+else
+CLANG_DL_EXT = .so
+CLANG_EXE_EXT =
+endif
+
 # Clang headers require these.
 CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 ifneq ($(OS),WNT)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk configure.ac distro-configs/Jenkins

2017-12-05 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |   16 +---
 configure.ac  |8 
 distro-configs/Jenkins/linux_clang_dbgutil_64 |1 +
 3 files changed, 10 insertions(+), 15 deletions(-)

New commits:
commit e754d0931ca75403647cc16100edd98e7e5ceadb
Author: Stephan Bergmann 
Date:   Tue Dec 5 10:21:53 2017 +0100

Remove CXXFLAGS_CXX11 from Clang plugin compilation

CXXFLAGS_CXX11 is for the compiler used to compile LO proper.  The plugin 
needs
to be compiled in a way compatible with compiling Clang, and the compiler 
and
any relevant flags can be controlled with COMPILER_PLUGINS_CXX.  (And at 
least
on macOS when compiling LO against a locally-built recent Clang trunk,
CXXFLAGS_CXX11 will now contain -std=gnu++17, but COMPILER_PLUGINS_CXX can 
still
point at Apple's Xcode clang++, which does not understand -std=gnu++17.)

Also, if COMPILER_PLUGINS_CXX is not set, simply default it to g++ instead 
of
trying to construct an acceptable CLANGCXX value from CXX (which would be
Clang).  (The problem with using Clang without CXXFLAGS_CXX11 is that Clang,
unlike GCC, typically defaults to C++03, but building compilerplugins 
requires
C++11 at least.  That would cause e.g. the Gerrit/Jenkins 
linux_clang_dbgutil_64
builds to fail---but which also needs COMPILER_PLUGINS_CXX to be explicitly 
set
to "g++ -std=c++11" as GCC on those machines is still 4.8.5 defaulting to
C++03.)

Change-Id: Id4ee4e54fa871cb6e621069cd050ae5b31922b34
Reviewed-on: https://gerrit.libreoffice.org/45856
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 89a798ebd34a..aad53a90ca5c 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -18,12 +18,6 @@ CLANG_DL_EXT = .so
 CLANG_EXE_EXT =
 endif
 
-ifeq ($(COMPILER_PLUGINS_CXX),)
-CLANGCXX=$(filter-out -m32 -m64 -fsanitize%,$(CXX))
-else
-CLANGCXX=$(COMPILER_PLUGINS_CXX)
-endif
-
 # Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin); you
 # may occasionally want to override these:
 ifeq ($(OS),WNT)
@@ -113,8 +107,8 @@ ifeq ($(OS),WNT)
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk 
$(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
-   $(QUIET)$(CLANGCXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) \
-$(CLANGINCLUDES) /I$(BUILDDIR)/config_host $(2) $(CXXFLAGS_CXX11) /MD \
+   $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) \
+$(CLANGINCLUDES) /I$(BUILDDIR)/config_host $(2) /MD \
 /c /Fo: $(3)
 
 -include $(CLANGOUTDIR)/$(1).d #TODO
@@ -128,7 +122,7 @@ else
 define clangbuildsrc
 $(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk 
$(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
-   $(QUIET)$(CLANGCXX) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGDEFS) 
$(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC $(CXXFLAGS_CXX11) -c -o 
$(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+   $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGCXXFLAGS) $(CLANGWERROR) 
$(CLANGDEFS) $(CLANGINCLUDES) -I$(BUILDDIR)/config_host $(2) -fPIC -c -o $(3) 
-MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
 
 -include $(CLANGOUTDIR)/$(1).d
 
@@ -143,10 +137,10 @@ $(foreach src, $(CLANGSRC), $(eval $(call 
clangbuildsrc,$(src),$(CLANGINDIR)/$(s
 $(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(CLANGOBJS)
@echo [build LNK] $(subst $(BUILDDIR)/,,$@)
 ifeq ($(OS),WNT)
-   $(QUIET)$(CLANGCXX) /LD $(CLANGOBJS) /Fe: $@ $(CLANGLIBDIR)/clang.lib \
+   $(QUIET)$(COMPILER_PLUGINS_CXX) /LD $(CLANGOBJS) /Fe: $@ 
$(CLANGLIBDIR)/clang.lib \
 mincore.lib version.lib /link $(COMPILER_PLUGINS_CXX_LINKFLAGS)
 else
-   $(QUIET)$(CLANGCXX) -shared $(CLANGOBJS) -o $@ \
+   $(QUIET)$(COMPILER_PLUGINS_CXX) -shared $(CLANGOBJS) -o $@ \
$(if $(filter MACOSX,$(OS)),-Wl$(CLANG_COMMA)-flat_namespace \
-Wl$(CLANG_COMMA)-undefined -Wl$(CLANG_COMMA)suppress)
 endif
diff --git a/configure.ac b/configure.ac
index 874a21e95ce0..208debcbe5a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6431,10 +6431,10 @@ if test "$COM_IS_CLANG" = "TRUE"; then
 AC_LANG_PUSH([C++])
 save_CPPFLAGS=$CPPFLAGS
 save_CXX=$CXX
-# compiler plugins must be built with "native" bitness of clang
-# because they link against clang libraries
-CXX=${COMPILER_PLUGINS_CXX-$(echo $CXX | sed -e s/-m64// -e s/-m32//)}
-CPPFLAGS="$CPPFLAGS $CXXFLAGS_CXX11 -I$CLANGDIR/include 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+# compiler plugins must be built with "native" compiler that was used 
to build Clang itself:
+: 

[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk jurt/Library_jpipe.mk setup_native/Library_getuid.mk

2017-05-16 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |2 +-
 jurt/Library_jpipe.mk |4 ++--
 setup_native/Library_getuid.mk|2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1772daba6afa394e1081028825e4f96e6387d9a3
Author: Stephan Bergmann 
Date:   Tue May 16 11:37:02 2017 +0200

Also filter out flags like -fsanitize-address-globals-dead-stripping

...to avoid -Werror,-Wunused-command-line-argument in case some ASan build
setting passes in such flags

Change-Id: Ia613a10e3564a23715019ee0c7c755cdcbf7a47c

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index dc9255725b9e..4839fdef2feb 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -11,7 +11,7 @@
 CLANG_COMMA :=,
 
 ifeq ($(COMPILER_PLUGINS_CXX),)
-CLANGCXX=$(filter-out -m32 -m64 -fsanitize=%,$(CXX))
+CLANGCXX=$(filter-out -m32 -m64 -fsanitize%,$(CXX))
 else
 CLANGCXX=$(COMPILER_PLUGINS_CXX)
 endif
diff --git a/jurt/Library_jpipe.mk b/jurt/Library_jpipe.mk
index 2e26df17e13d..5759baed5175 100644
--- a/jurt/Library_jpipe.mk
+++ b/jurt/Library_jpipe.mk
@@ -79,9 +79,9 @@ $(eval $(call gb_Library_add_libs,jpipe, \
 ))
 
 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
-gb_CC := $(filter-out -fsanitize=%,$(gb_CC))
+gb_CC := $(filter-out -fsanitize%,$(gb_CC))
 $(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,jpipe)): \
-gb_CXX := $(filter-out -fsanitize=%,$(gb_CXX))
+gb_CXX := $(filter-out -fsanitize%,$(gb_CXX))
 
 endif
 endif
diff --git a/setup_native/Library_getuid.mk b/setup_native/Library_getuid.mk
index 650cfaf1897b..4212e5f4b4d5 100644
--- a/setup_native/Library_getuid.mk
+++ b/setup_native/Library_getuid.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_Library_add_defs,getuid,\
 ))
 endif
 
-$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,getuid)) : 
gb_CC := $(filter-out -fsanitize=%,$(gb_CC))
+$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktarget,getuid)) : 
gb_CC := $(filter-out -fsanitize%,$(gb_CC))
 
 # the library is used by LD_PRELOAD; make sure that we see the symbols ;-)
 ifeq ($(COM),GCC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2016-06-30 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 944ed68645fbf9731c699dda9361719759af4ac4
Author: Stephan Bergmann 
Date:   Thu Jun 30 09:27:58 2016 +0200

Explain usage of -isystem instead of -I

Change-Id: Ib7153db5c2c1542ff7e9a0daa6d7124225c7701c

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 5939868..dc92557 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -24,7 +24,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.
+# All include locations needed (using -isystem silences various warnings when
+# including those files):
 CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include)
 
 # Clang/LLVM libraries are intentionally not linked in, they are usually built 
as static libraries, which means the resulting
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2016-06-30 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 4d54e240262ffb2d2de1d72986f025657e230c77
Author: Stephan Bergmann 
Date:   Thu Jun 30 09:11:54 2016 +0200

Who needs that $(CLANGDIR)/tools/clang/include anyway?

It was included ever since 02a8d36ebf3d54784903f2899eafe010bedf2f4c "initial
support for clang compiler plugins" but will probably point at either a non-
existing dir or a dir in the Clang source tree (that does not even contain 
all
the include files that the corresponding installation dir would contain, as 
some
include files are generated during the build).  For a properly installed 
LLVM/
Clang, all include files should be found underneath a single include/ dir.

Change-Id: Ie23cb1ae701eed1ee78448eb6c828d07b15121c2

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index cc2bdc7..5939868 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -25,8 +25,7 @@ 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=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include) \
- -isystem $(CLANGDIR)/tools/clang/include
+CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/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
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2016-06-29 Thread Michael Stahl
 compilerplugins/Makefile-clang.mk |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 11f69994b0231a760231b712d9faf6806334232f
Author: Michael Stahl 
Date:   Wed Jun 29 22:34:02 2016 +0200

compilerplugins: -isystem /usr/include breaks the build

... on Fedora 24, and it's a Bad Idea in general because it breaks
"#include_next" ordering of GCC's and glibc's variously distributed
headers.

Change-Id: I0c8b51a6d7191ec9cc5187636ea2717e8fd97715

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 868b5b0..cc2bdc7 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
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2014-05-22 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5db9861383f054c6e2018c0e90d31ee1c89b25b4
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu May 22 14:18:51 2014 +0200

Filter out all -fsanitize= args when building compilerplugins

Change-Id: Ic809ddad81608f107749498c1432606403ee2314

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 8f8311b..bed75ce 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -11,7 +11,7 @@
 CLANG_COMMA :=,
 
 # You may occasionally want to override some of these
-CLANGCXX=$(filter-out -m32 -m64 -fsanitize=address,$(CXX))
+CLANGCXX=$(filter-out -m32 -m64 -fsanitize=%,$(CXX))
 
 # Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
 CLANGCXXFLAGS=-O2 -Wall -Wextra -g
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2014-05-09 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c149c6cc3077a8ca4be4959ad327055264bc854f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri May 9 16:35:23 2014 +0200

compilerplugins/clang: filter out -fsanitize=address

Change-Id: I3e78bd86c8010124a2d006f288095aac26e60797

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 2c57f40..a5e6a15 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -11,7 +11,7 @@
 CLANG_COMMA :=,
 
 # You may occassionally want to override some of these
-CLANGCXX=$(filter-out -m32 -m64,$(CXX))
+CLANGCXX=$(filter-out -m32 -m64 -fsanitize=address,$(CXX))
 
 # Compile flags ('make CLANGCXXFLAGS=-g' if you need to debug the plugin)
 CLANGCXXFLAGS=-O2 -Wall -Wextra -g
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac

2014-02-25 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |4 ++--
 config_host.mk.in |1 -
 configure.ac  |8 +---
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 95700a2d7d09893fe16aadb406e93bf7164f7422
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue Feb 25 10:55:26 2014 +0100

Drop CLANGBUILD in addition to CLANGDIR

...see

http://lists.freedesktop.org/archives/libreoffice/2014-February/059654.html
Drop CLANGBUILD in addition to CLANGDIR?

Change-Id: I8d68aa0f2298240c8e7265cab273c602f5b6881a

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 5d09346..2c57f40 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -21,7 +21,7 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -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 -isystem $(CLANGBUILD)/include -isystem 
$(CLANGBUILD)/tools/clang/include
+CLANGINCLUDES=-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
@@ -93,7 +93,7 @@ $(CLANGOUTDIR)/plugin.so: $(CLANGOBJS)
-Wl$(CLANG_COMMA)-undefined -Wl$(CLANG_COMMA)suppress)
 
 # Clang most probably doesn't maintain binary compatibility, so rebuild when 
clang changes.
-$(CLANGOUTDIR)/clang-timestamp: $(CLANGBUILD)/bin/clang
+$(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang
$(QUIET)touch $@
 
 # vim: set noet sw=4 ts=4:
diff --git a/config_host.mk.in b/config_host.mk.in
index 697d788..a9caf50 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -51,7 +51,6 @@ export CC=@CC@
 export CDR_CFLAGS=$(gb_SPACE)@CDR_CFLAGS@
 export CDR_LIBS=$(gb_SPACE)@CDR_LIBS@
 @x_CFLAGS@ export CFLAGS=@CFLAGS@
-export CLANGBUILD=@CLANGBUILD@
 export CLANGDIR=@CLANGDIR@
 export CLUCENE_CFLAGS=$(gb_SPACE)@CLUCENE_CFLAGS@
 export CLUCENE_LIBS=$(gb_SPACE)@CLUCENE_LIBS@
diff --git a/configure.ac b/configure.ac
index c400d23..c6da52b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5656,18 +5656,13 @@ if test $COM_GCC_IS_CLANG = TRUE; then
 if test -z $CLANGDIR; then
 CLANGDIR=/usr
 fi
-dnl The build directory (different from CLANGDIR if using a Clang out-
-dnl of-source build):
-if test -z $CLANGBUILD; then
-CLANGBUILD=/usr
-fi
 AC_LANG_PUSH([C++])
 save_CPPFLAGS=$CPPFLAGS
 save_CXX=$CXX
 # compiler plugins must be built with native bitness of clang
 # because they link against clang libraries
 CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
-CPPFLAGS=$CPPFLAGS -I$CLANGDIR/include 
-I$CLANGDIR/tools/clang/include -I$CLANGBUILD/include 
-I$CLANGBUILD/tools/clang/include -D__STDC_CONSTANT_MACROS 
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
+CPPFLAGS=$CPPFLAGS -I$CLANGDIR/include 
-I$CLANGDIR/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS 
-D__STDC_LIMIT_MACROS
 AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
 [COMPILER_PLUGINS=TRUE],
 [
@@ -5689,7 +5684,6 @@ else
 fi
 AC_SUBST(COMPILER_PLUGINS)
 AC_SUBST(CLANGDIR)
-AC_SUBST(CLANGBUILD)
 
 # Plugin to help linker.
 # Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/Makefile-clang.mk

2013-06-05 Thread Stephan Bergmann
 compilerplugins/Makefile-clang.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 89d47f818a9628aacfd921a199e3830032018293
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jun 5 23:35:07 2013 +0200

Ignore warnings in Clang headers

(as occur at least in trunk Clang builds)

Change-Id: I7e74200ae1042133fa04477e39e46fd2f01cc1b0

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 3e7ef93..34b9ac9 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -18,7 +18,7 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -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=-I$(CLANGDIR)/include -I$(CLANGDIR)/tools/clang/include 
-I$(CLANGBUILD)/include -I$(CLANGBUILD)/tools/clang/include
+CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem 
$(CLANGDIR)/tools/clang/include -isystem $(CLANGBUILD)/include -isystem 
$(CLANGBUILD)/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
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits