diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2014-09-15 17:11:24 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2014-09-15 17:38:49 +0200 |
commit | ef23973d7e49e215a1a4ba1de601c96a068fa33c (patch) | |
tree | 76638b961019710ad19777d1d87b6ac1a3465cf6 | |
parent | 5f367a3919e2407ac785e28c6c155ce3f93d0ec6 (diff) |
gbuild command for disabling usage of compiler plugins for a target
to be used by odk/ checkapi test
Change-Id: I6bbb508cc6950a63218e8e4f3364306c7c79b087
-rw-r--r-- | solenv/gbuild/CppunitTest.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/Executable.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/Library.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 19 | ||||
-rw-r--r-- | solenv/gbuild/StaticLibrary.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_class.mk | 6 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 2 |
7 files changed, 21 insertions, 10 deletions
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk index 6d2d46110f88..0876deed6491 100644 --- a/solenv/gbuild/CppunitTest.mk +++ b/solenv/gbuild/CppunitTest.mk @@ -380,6 +380,7 @@ $(eval $(foreach method,\ set_visibility_default \ set_warnings_not_errors \ set_generated_cxx_suffix \ + disable_compiler_plugins \ ,\ $(call gb_CppunitTest__forward_to_Linktarget,$(method))\ )) diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk index 9cf7e1a02705..83298ad8dcfa 100644 --- a/solenv/gbuild/Executable.mk +++ b/solenv/gbuild/Executable.mk @@ -139,6 +139,7 @@ $(eval $(foreach method,\ add_nativeres \ set_warnings_not_errors \ set_generated_cxx_suffix \ + disable_compiler_plugins \ ,\ $(call gb_Executable_forward_to_Linktarget,$(method))\ )) diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk index f30898547851..6bc20f7c5ca5 100644 --- a/solenv/gbuild/Library.mk +++ b/solenv/gbuild/Library.mk @@ -224,6 +224,7 @@ $(eval $(foreach method,\ set_visibility_default \ set_warnings_not_errors \ set_generated_cxx_suffix \ + disable_compiler_plugins \ ,\ $(call gb_Library__forward_to_Linktarget,$(method))\ )) diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index d78d4d831b0b..cd202cb7939f 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -136,7 +136,7 @@ $(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) $(gb else $(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.c,$(true),C ,3) - $(call gb_CObject__command_pattern,$@,$(T_CFLAGS) $(T_CFLAGS_APPEND),$<,$(call gb_CObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_CFLAGS) $(T_CFLAGS_APPEND),$<,$(call gb_CObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) endif # Note: if the *Object_dep_target does not exist it will be created by @@ -188,7 +188,7 @@ else $(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.cxx,$(true),CXX,3) $(eval $(gb_CxxObject__set_pchflags)) - $(call gb_CObject__command_pattern,$@,$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND),$<,$(call gb_CxxObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND),$<,$(call gb_CxxObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) endif ifeq ($(gb_FULLDEPS),$(true)) @@ -212,7 +212,7 @@ gb_GenCObject_get_source = $(WORKDIR)/$(1).c $(call gb_GenCObject_get_target,%) : $(call gb_Output_announce,$*.c,$(true),C ,3) test -f $(call gb_GenCObject_get_source,$*) || (echo "Missing generated source file $(call gb_GenCObject_get_source,$*)" && false) - $(call gb_CObject__command_pattern,$@,$(T_CFLAGS) $(T_CFLAGS_APPEND),$(call gb_GenCObject_get_source,$*),$(call gb_GenCObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_CFLAGS) $(T_CFLAGS_APPEND),$(call gb_GenCObject_get_source,$*),$(call gb_GenCObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_GenCObject_get_dep_target,%)).dir : @@ -235,7 +235,7 @@ $(call gb_GenCxxObject_get_target,%) : $(call gb_Output_announce,$*.cxx,$(true),CXX,3) test -f $(GEN_CXX_SOURCE) || (echo "Missing generated source file $(GEN_CXX_SOURCE)" && false) $(eval $(gb_CxxObject__set_pchflags)) - $(call gb_CObject__command_pattern,$@,$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND),$(GEN_CXX_SOURCE),$(call gb_GenCxxObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND),$(GEN_CXX_SOURCE),$(call gb_GenCxxObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_GenCxxObject_get_dep_target,%)).dir : @@ -322,7 +322,7 @@ else $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.mm,$(true),OCX,3) - $(call gb_CObject__command_pattern,$@,$(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND),$<,$(call gb_ObjCxxObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND),$<,$(call gb_ObjCxxObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_ObjCxxObject_get_dep_target,%)).dir : @@ -350,7 +350,7 @@ else $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(call gb_Output_announce,$*.m,$(true),OCC,3) - $(call gb_CObject__command_pattern,$@,$(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND),$<,$(call gb_ObjCObject_get_dep_target,$*)) + $(call gb_CObject__command_pattern,$@,$(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND),$<,$(call gb_ObjCObject_get_dep_target,$*),$(T_COMPILER_PLUGINS)) ifeq ($(gb_FULLDEPS),$(true)) $(dir $(call gb_ObjCObject_get_dep_target,%)).dir : @@ -618,6 +618,7 @@ $(call gb_LinkTarget_get_target,$(1)) : NATIVERES := $(call gb_LinkTarget_get_target,$(1)) : VISIBILITY := $(call gb_LinkTarget_get_target,$(1)) : WARNINGS_NOT_ERRORS := $(call gb_LinkTarget_get_target,$(1)) : SOVERSIONSCRIPT := +$(call gb_LinkTarget_get_target,$(1)) : T_COMPILER_PLUGINS := $$(COMPILER_PLUGINS) ifeq ($(gb_FULLDEPS),$(true)) ifeq (depcache:,$(filter depcache,$(.FEATURES)):$(gb_PARTIAL_BUILD)) @@ -1367,4 +1368,10 @@ gb_LinkTarget_CXX_SUFFIX_$(call gb_LinkTarget__get_workdir_linktargetname,$(1)) endef +# call gb_LinkTarget_disable_compiler_plugins,linktarget +define gb_LinkTarget_disable_compiler_plugins +$(call gb_LinkTarget_get_target,$(1)) : T_COMPILER_PLUGINS := + +endef + # vim: set noet sw=4: diff --git a/solenv/gbuild/StaticLibrary.mk b/solenv/gbuild/StaticLibrary.mk index 1535e442977d..39ba0fa49979 100644 --- a/solenv/gbuild/StaticLibrary.mk +++ b/solenv/gbuild/StaticLibrary.mk @@ -99,6 +99,7 @@ $(eval $(foreach method,\ set_precompiled_header \ set_warnings_not_errors \ set_generated_cxx_suffix \ + disable_compiler_plugins \ ,\ $(call gb_StaticLibrary_forward_to_Linktarget,$(method))\ )) diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk index 6c8c57456b0d..e2e4a2a3a4e5 100644 --- a/solenv/gbuild/platform/com_GCC_class.mk +++ b/solenv/gbuild/platform/com_GCC_class.mk @@ -42,17 +42,17 @@ endef # CObject class -# $(call gb_CObject__command_pattern,object,flags,source,dep-file) +# $(call gb_CObject__command_pattern,object,flags,source,dep-file,compiler-plugins) define gb_CObject__command_pattern $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \ - $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \ + $(if $(5),$(gb_COMPILER_PLUGINS_SETUP)) \ $(if $(filter %.c %.m,$(3)), $(gb_CC), $(gb_CXX)) \ $(DEFS) \ $(gb_LTOFLAGS) \ $(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \ $(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \ - $(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \ + $(if $(5),$(gb_COMPILER_PLUGINS)) \ $(2) \ -c $(3) \ -o $(1) \ diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 67bd4a5ba777..b1546fefc151 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -34,7 +34,7 @@ endef # CObject class -# $(call gb_CObject__command_pattern,object,flags,source,dep-file) +# $(call gb_CObject__command_pattern,object,flags,source,dep-file,compiler-plugins) define gb_CObject__command_pattern $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) $(dir $(4)) && \ |