diff options
author | Luboš Luňák <l.lunak@centrum.cz> | 2021-09-22 12:28:37 +0000 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-22 15:33:07 +0200 |
commit | 6507eddc33332d760c8807633268558c47e8cb06 (patch) | |
tree | 3563d004e2280d70cf0af0b57ebd90d60112f2d8 | |
parent | 9df17d12a0e069d0a0db262368abc153b92169a0 (diff) |
avoid some more D9025 warnings
Change-Id: I01f8df5f399b17f46da9a59501bea28bc70cac4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122431
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | solenv/gbuild/platform/com_MSC_class.mk | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk index 3ea82e6c4936..ca6c60064897 100644 --- a/solenv/gbuild/platform/com_MSC_class.mk +++ b/solenv/gbuild/platform/com_MSC_class.mk @@ -47,10 +47,16 @@ endef # Avoid annoying warning D9025 about overriding command-line arguments. gb_Helper_remove_overridden_flags = \ + $(filter-out -W4 -w -arch:SSE -arch:SSE2 -arch:AVX -arch:AVX2 -Od -O2 -Zc:inline -Zc:inline- \ + -Zc:dllexportInlines -Zc:dllexportInlines- -EHs -EHa -DNOMINMAX -UNOMINMAX -D_X86_=1 -U_X86_ \ + -D_AMD64_=1 -U_AMD64_,$(1)) \ $(lastword $(filter -W4 -w,$(1))) \ - $(filter-out -W4 -w -arch:SSE -arch:SSE2 -arch:AVX -arch:AVX2 -Od -O2 -Zc:inline -Zc:inline- -Zc:dllexportInlines -Zc:dllexportInlines-,$(1)) \ $(lastword $(filter -Od -O2,$(1))) \ $(lastword $(filter -arch:SSE -arch:SSE2 -arch:AVX -arch:AVX2,$(1))) \ + $(lastword $(filter -EHs -EHa,$(1))) \ + $(lastword $(filter -DNOMINMAX -UNOMINMAX,$(1))) \ + $(lastword $(filter -D_X86_=1 -U_X86_,$(1))) \ + $(lastword $(filter -D_AMD64_=1 -U_AMD64_,$(1))) \ $(lastword $(filter -Zc:inline -Zc:inline-,$(1))) \ $(lastword $(filter -Zc:dllexportInlines -Zc:dllexportInlines-,$(1))) @@ -60,22 +66,22 @@ $(call gb_Helper_abbreviate_dirs,\ mkdir -p $(dir $(1)) $(dir $(4)) && \ unset INCLUDE && \ $(call gb_CObject__compiler,$(2),$(3),$(7)) \ - $(DEFS) \ - $(gb_LTOFLAGS) \ $(call gb_Helper_remove_overridden_flags, \ - $(2) $(if $(WARNINGS_DISABLED),$(gb_CXXFLAGS_DISABLE_WARNINGS))) \ - $(if $(EXTERNAL_CODE), \ - $(if $(filter -clr,$(2)),,$(if $(COM_IS_CLANG),-Wno-undef)), \ - $(gb_DEFS_INTERNAL)) \ - $(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \ - $(if $(filter -clr,$(2)),,$(if $(5),$(gb_COMPILER_PLUGINS))) \ - $(if $(COMPILER_TEST),-fsyntax-only -ferror-limit=0 -Xclang -verify) \ - -Fd$(PDBFILE) \ - $(PCHFLAGS) \ - $(if $(COMPILER_TEST),,$(gb_COMPILERDEPFLAGS)) \ + $(DEFS) \ + $(gb_LTOFLAGS) \ + $(2) $(if $(WARNINGS_DISABLED),$(gb_CXXFLAGS_DISABLE_WARNINGS)) \ + $(if $(EXTERNAL_CODE), \ + $(if $(filter -clr,$(2)),,$(if $(COM_IS_CLANG),-Wno-undef)), \ + $(gb_DEFS_INTERNAL)) \ + $(if $(WARNINGS_NOT_ERRORS),$(if $(ENABLE_WERROR),$(if $(PLUGIN_WARNINGS_AS_ERRORS),$(gb_COMPILER_PLUGINS_WARNINGS_AS_ERRORS))),$(gb_CFLAGS_WERROR)) \ + $(if $(filter -clr,$(2)),,$(if $(5),$(gb_COMPILER_PLUGINS))) \ + $(if $(COMPILER_TEST),-fsyntax-only -ferror-limit=0 -Xclang -verify) \ + $(PCHFLAGS) \ + $(if $(COMPILER_TEST),,$(gb_COMPILERDEPFLAGS)) \ + $(if $(filter YES,$(LIBRARY_X64)), -U_X86_ -D_AMD64_,) \ + $(if $(filter YES,$(PE_X86)), -D_X86_ -U_AMD64_,)) \ $(INCLUDE) \ - $(if $(filter YES,$(LIBRARY_X64)), -U_X86_ -D_AMD64_,) \ - $(if $(filter YES,$(PE_X86)), -D_X86_ -U_AMD64_,) \ + -Fd$(PDBFILE) \ -c $(3) \ -Fo$(1)) $(if $(filter $(true),$(6)),/link /DEBUG:FASTLINK) \ $(if $(COMPILER_TEST),,$(call gb_create_deps,$(4),$(1),$(3))) |