diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-06-25 09:05:26 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-06-25 19:46:58 +0200 |
commit | 4139e0edebe42844054b1120778a54b2b2325a49 (patch) | |
tree | bcf22e413534e929b9a09445955c86122a951c12 /compilerplugins/Makefile-clang.mk | |
parent | 4999c99529f1b1543ef110da9e6c0dcbd9f73032 (diff) |
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 <sbergman@redhat.com>
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins/Makefile-clang.mk')
-rw-r--r-- | compilerplugins/Makefile-clang.mk | 22 |
1 files changed, 18 insertions, 4 deletions
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),,@) |