compilerplugins/Makefile-clang.mk | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-)
New commits: commit 4139e0edebe42844054b1120778a54b2b2325a49 Author: Luboš Luňák <l.lu...@collabora.com> AuthorDate: Tue Jun 25 09:05:26 2019 +0200 Commit: Luboš Luňák <l.lu...@collabora.com> 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 <sberg...@redhat.com> Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lu...@collabora.com> 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