VirtualBox

Changeset 102415 in vbox for trunk


Ignore:
Timestamp:
Dec 1, 2023 9:42:46 AM (15 months ago)
Author:
vboxsync
Message:

/Config.kmk: Use the -Zc:inline option with Visual C++ 2015 and later. This makes inline C++11 conformant, and more importantly seems to remove unreferenced copies of inline functions from the object file. The linker will remove these, but better if we don't bloat the object file with them in the first place. bugref:10348

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r102369 r102415  
    53345334   TEMPLATE_VBoxRc_CXXFLAGS         += -Gw
    53355335  endif
     5336  if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140"
     5337   TEMPLATE_VBoxRc_CXXFLAGS         += -Zc:inline
     5338  endif
    53365339  ifdef VBOX_WITH_MSC_ANALYZE_THIS
    53375340   TEMPLATE_VBoxRc_CXXFLAGS         += /analyze
     
    54845487 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120"
    54855488  TEMPLATE_VBoxR0_CXXFLAGS         += -Gw
     5489 endif
     5490 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     5491  TEMPLATE_VBoxR0_CXXFLAGS         += -Zc:inline
    54865492 endif
    54875493 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC142" # Don't waste space on x86/amd64-on-arm emulation optimizations.
     
    56845690 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120"
    56855691  TEMPLATE_VBoxR0Drv_CXXFLAGS         += -Gw
     5692 endif
     5693 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     5694  TEMPLATE_VBoxR0Drv_CXXFLAGS         += -Zc:inline
    56865695 endif
    56875696 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC142" # Don't waste space on x86/amd64-on-arm emulation optimizations.
     
    62496258  TEMPLATE_VBoxR3Exe_CXXFLAGS         += -Gw
    62506259 endif
     6260 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     6261  TEMPLATE_VBoxR3Exe_CXXFLAGS         += -Zc:inline
     6262 endif
    62516263 ifdef VBOX_WITH_MSC_ANALYZE_THIS
    62526264  TEMPLATE_VBoxR3Exe_CXXFLAGS         += /analyze
     
    72007212 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120"
    72017213  TEMPLATE_VBoxMainExe_CXXFLAGS         += -Gw
     7214 endif
     7215 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     7216  TEMPLATE_VBoxMainExe_CXXFLAGS         += -Zc:inline
    72027217 endif
    72037218 ifdef VBOX_WITH_MSC_ANALYZE_THIS
     
    79147929   TEMPLATE_VBoxQtGuiExe_CXXFLAGS += -Gw
    79157930  endif
     7931  if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     7932   TEMPLATE_VBoxQtGuiExe_CXXFLAGS += -Zc:inline
     7933  endif
    79167934  ifdef VBOX_WITH_MSC_ANALYZE_THIS
    79177935   TEMPLATE_VBoxQtGuiExe_CXXFLAGS += /analyze
     
    82328250 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120"
    82338251  TEMPLATE_VBoxBldProg_CXXFLAGS         += -Gw
     8252 endif
     8253 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC140" # Reduces object size, speeding up linking and makes inline behaviour C++11 compliant.
     8254  TEMPLATE_VBoxBldProg_CXXFLAGS         += -Zc:inline
    82348255 endif
    82358256 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC142" # Don't waste space on x86/amd64-on-arm emulation optimizations.
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