VirtualBox

Changeset 93024 in vbox


Ignore:
Timestamp:
Dec 19, 2021 10:44:55 AM (3 years ago)
Author:
vboxsync
Message:

/Config.kmk,Main/Makefile.kmk,VBoxNetFlt/Makefile.kmk: Promopted def_VBoxMainDisableMscWarnings to /Config.kmk and renamed it to def_VBoxMidlOutputDisableMscWarnings so we can also apply it to the VBoxNetFlt MIDL output. Problem was that MIDL from 10.0.19041.0 produced some #if XXX tests for undefined defines. bugref:10116

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r93023 r93024  
    22132213# Define the macro for win path conversion.
    22142214ifndef VBOX_ONLY_SDK
    2215  if1of (quote,$(KMK_FEATURES))
    2216   VBOX_FN_MAKE_WIN_PATH = "$(quote-sh-dq $(subst /,\,$(requote unq, $(1))))"
    2217  else
    2218   VBOX_FN_MAKE_WIN_PATH = $(subst /,\\,$(1))
    2219  endif
     2215 VBOX_FN_MAKE_WIN_PATH = "$(quote-sh-dq $(subst /,\,$(requote unq, $(1))))"
    22202216else
    2221   # on Wine Z: is always FS root
     2217  # Z: is always FS root for Wine.
    22222218  VBOX_FN_MAKE_WIN_PATH = $(subst /,\\,$(patsubst /%,Z:/%,$(1)))
    22232219endif #!VBOX_ONLY_SDK
     
    23782374
    23792375# The Microsoft IDL compiler (the SDK build needs this on non-Windows).
    2380 VBOX_WIN_MIDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(firstword $(wildcard $(addsuffix /[Mm][Ii][Dd][Ll].[Ee][Xx][Ee], \
     2376VBOX_WIN_MIDL ?= $(EXEC_X86_WIN32) $(call VBOX_FN_MAKE_WIN_PATH,$(qfirstfile ,$(qwildcard ,$(qaddsuffix ,/[Mm][Ii][Dd][Ll].[Ee][Xx][Ee], \
    23812377        $(PATH_SDK_$(VBOX_WINPSDK)_BIN) \
    23822378        $(KBUILD_DEVTOOLS)/win.x86/sdk/v7.1/Bin$(if-expr "$(KBUILD_HOST).$(KBUILD_HOST_ARCH)" == "win.amd64",/x64,) \
     
    24002396VBOX_MIDL_CPP_CMD      = $(lastword $(notdir ,$(subst $(EXEC_X86_WIN32),,$(TOOL_$(VBOX_VCC_TOOL)_CC))))
    24012397VBOX_MIDL_CPP_CMD_X86  = $(lastword $(notdir ,$(subst $(EXEC_X86_WIN32),,$(TOOL_$(VBOX_VCC_TOOL_STEM)X86_CC))))
     2398
     2399##
     2400# Edits $1 and adding #pragma directives for disabling warnings windows.h causes.
     2401# @param 1     The name of the file to edit.
     2402define def_VBoxMidlOutputDisableMscWarnings
     2403        $(QUIET)$(MV) -f "$1" "$1.tmp"
     2404        $(QUIET)$(APPEND) -nt "$1" \
     2405                '#if _MSC_VER >= 1920 /* RT_MSC_VER_VS2019 */' \
     2406                '# pragma warning(disable:5031 5032) /* buggy winioctl.h in some w10 sdks */ ' \
     2407               '#endif' \
     2408                '#pragma warning(push) /* -Wall and windows.h */' \
     2409                '#pragma warning(disable:4668 4255)' \
     2410                '#if _MSC_VER >= 1800 /* RT_MSC_VER_VC120 */' \
     2411                '# pragma warning(disable:4005)' \
     2412                '#endif' \
     2413                '#if _MSC_VER >= 1900 /* RT_MSC_VER_VC140 */' \
     2414                '# pragma warning(disable:5039)' \
     2415                '#endif' \
     2416               ''
     2417        $(QUIET)$(CAT_EXT) "$1.tmp" >> "$1"
     2418        $(QUIET)$(APPEND) -n "$1" \
     2419                '' \
     2420                '#pragma warning(pop)' \
     2421               ''
     2422        $(QUIET)$(RM) -f "$1.tmp"
     2423
     2424endef
    24022425
    24032426# XPCOM setup for all but win32.
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk

    r92973 r93024  
    354354                $(PATH_SUB_CURRENT)/win/nobj/VBoxNetFltNobjT.idl \
    355355                | $$(dir $$@)
    356 ifdef KMK_WITH_QUOTING
    357356        $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo \
    358357                /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNobj_0_OUTDIR)) \
     
    360359                $(qforeachfile unq, incdir, $(SDK_$(VBOX_WINDDK)_INCS) $(SDK_$(VBOX_WINPSDK)_INCS),/I $(quote-sh $(incdir))) \
    361360                $(call VBOX_FN_MAKE_WIN_PATH,$<)
    362 else
    363         $(VBOX_MIDL_REDIRECT) $(VBOX_WIN_MIDL) /nologo \
    364                 /out $(call VBOX_FN_MAKE_WIN_PATH,$(VBoxNetFltNobj_0_OUTDIR)) \
    365                 /cpp_cmd $(VBOX_MIDL_CPP_CMD) \
    366                 $(foreach incdir, $(SDK_$(VBOX_WINDDK)_INCS) $(SDK_$(VBOX_WINPSDK)_INCS),/I $(call VBOX_FN_MAKE_WIN_PATH,$(incdir)) ) \
    367                 $(call VBOX_FN_MAKE_WIN_PATH,$<)
    368 endif
     361        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT.h)
     362        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_i.c)
     363        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxNetFltNobj_0_OUTDIR)/VBoxNetFltNobjT_p.c)
     364
    369365
    370366 #
  • trunk/src/VBox/Main/Makefile.kmk

    r92970 r93024  
    15761576if defined(VBOX_ONLY_SDK) || "$(KBUILD_TARGET)" == "win"
    15771577
    1578  ##
    1579  # Edits $1 and adding #pragma directives for disabling warnings windows.h causes.
    1580  # @param 1     The name of the file to edit.
    1581  define def_VBoxMainDisableMscWarnings
    1582         $(QUIET)$(MV) -f "$1" "$1.tmp"
    1583         $(QUIET)$(APPEND) -nt "$1" \
    1584                 '#if _MSC_VER >= 1920 /* RT_MSC_VER_VS2019 */' \
    1585                 '# pragma warning(disable:5031 5032) /* buggy winioctl.h in some w10 sdks */ ' \
    1586                '#endif' \
    1587                 '#pragma warning(push) /* -Wall and windows.h */' \
    1588                 '#pragma warning(disable:4668 4255)' \
    1589                 '#if _MSC_VER >= 1800 /* RT_MSC_VER_VC120 */' \
    1590                 '# pragma warning(disable:4005)' \
    1591                 '#endif' \
    1592                 '#if _MSC_VER >= 1900 /* RT_MSC_VER_VC140 */' \
    1593                 '# pragma warning(disable:5039)' \
    1594                 '#endif' \
    1595                ''
    1596         $(QUIET)$(CAT_EXT) "$1.tmp" >> "$1"
    1597         $(QUIET)$(APPEND) -n "$1" \
    1598                 '' \
    1599                 '#pragma warning(pop)' \
    1600                ''
    1601         $(QUIET)$(RM) -f "$1.tmp"
    1602 
    1603  endef
    1604 
    16051578 # Note! Because we've got a different proxy stub DLL for pre windows 7 64-bit hosts, we target windows 7 for AMD64.
    16061579 #       The output is different and hopefully more efficient, at least memory wise (using more helpers in OLE32).
     
    16211594                /I idl \
    16221595                $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
    1623         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
    1624         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
    1625         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
     1596        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox.h)
     1597        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_i.c)
     1598        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/VirtualBox_p.c)
    16261599
    16271600 if defined(VBOX_WITH_MIDL_PROXY_STUB)
     
    16461619                /I idl \
    16471620                $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
    1648         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
    1649         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
    1650         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
     1621        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox.h)
     1622        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_i.c)
     1623        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM_0_OUTDIR)/legacy/VirtualBox_p.c)
    16511624 endif
    16521625
     
    16681641                /I idl \
    16691642                $(call VBOX_FN_MAKE_WIN_PATH,$(VBOX_IDL_FILE.MSCOM))
    1670         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
    1671         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
    1672         $(call def_VBoxMainDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
     1643        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox.h)
     1644        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_i.c)
     1645        $(call def_VBoxMidlOutputDisableMscWarnings,$(VBoxCOM-x86_0_OUTDIR)/VirtualBox_p.c)
    16731646  endif
    16741647
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette