VirtualBox

Changeset 92796 in vbox for trunk


Ignore:
Timestamp:
Dec 7, 2021 11:24:51 PM (3 years ago)
Author:
vboxsync
Message:

/Config.kmk: The VBOXGUESTR3EXE template (base for all ring-3 GA bits) must set IN_RT_STATIC because declspec(dllexport) makes the /Gy option useless on RTDECL & RTR3DECL functions. Added /Gw, which does the same to data as /Gy does to code. Reduces the bin/addition size from 40.1 MiB to 25.3 MiB, saving around 37%. Also applied the /Gw option to VBOXR3STATIC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r92595 r92796  
    58435843 TEMPLATE_VBOXR3STATIC_PCHFLAGS        = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_PCHFLAGS)) -MT$(VBOX_VCC_CRT_TYPE) -Gy
    58445844 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120" # Do not use SSE so valkit stuff can run on NT4 w/o needing a separate runtime library.
    5845   TEMPLATE_VBOXR3STATIC_CFLAGS.win.x86   = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) /arch:IA32 -Gw
    5846   TEMPLATE_VBOXR3STATIC_CXXFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) /arch:IA32 -Gw
    5847   TEMPLATE_VBOXR3STATIC_PCHFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) /arch:IA32 -Gw
    5848  endif
    5849  TEMPLATE_VBOXR3STATIC_LDFLAGS         = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
     5845  TEMPLATE_VBOXR3STATIC_CFLAGS.win.x86     = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) /arch:IA32
     5846  TEMPLATE_VBOXR3STATIC_CXXFLAGS.win.x86   = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) /arch:IA32
     5847  TEMPLATE_VBOXR3STATIC_PCHFLAGS.win.x86   = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) /arch:IA32
     5848  TEMPLATE_VBOXR3STATIC_CFLAGS            += -Gw
     5849  TEMPLATE_VBOXR3STATIC_CXXFLAGS          += -Gw
     5850  TEMPLATE_VBOXR3STATIC_PCHFLAGS          += -Gw
     5851 endif
     5852 TEMPLATE_VBOXR3STATIC_LDFLAGS             = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
    58505853        /DISALLOWLIB:msvcrt.lib \
    58515854        /DISALLOWLIB:msvcrtd.lib \
     
    77227725 TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS = $(filter-out -MD$(VBOX_VCC_CRT_TYPE), $(TEMPLATE_VBOXR3EXE_CFLAGS)) -MT$(VBOX_VCC_CRT_TYPE) -Gy
    77237726 if "$(VBOX_VCC_TOOL_STEM)" >= "VCC120" # Do not use SSE so the binaries might works on NT4 and earlier.
    7724   TEMPLATE_VBOXGUESTR3EXE_CFLAGS.win.x86   = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) /arch:IA32 -Gw
    7725   TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) /arch:IA32 -Gw
    7726   TEMPLATE_VBOXGUESTR3EXE_PCHFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) /arch:IA32 -Gw
     7727  TEMPLATE_VBOXGUESTR3EXE_CFLAGS.win.x86   = $(TEMPLATE_VBOXR3EXE_CFLAGS.win.86) /arch:IA32
     7728  TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.win.86) /arch:IA32
     7729  TEMPLATE_VBOXGUESTR3EXE_PCHFLAGS.win.x86 = $(TEMPLATE_VBOXR3EXE_PCHFLAGS.win.86) /arch:IA32
     7730  TEMPLATE_VBOXGUESTR3EXE_CFLAGS          += -Gw
     7731  TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS        += -Gw
     7732  TEMPLATE_VBOXGUESTR3EXE_PCHFLAGS        += -Gw
    77277733 endif
    77287734 TEMPLATE_VBOXGUESTR3EXE_LDFLAGS  = $(filter-out /DISALLOWLIB:libcmt$(VBOX_VCC_CRT_TYPE).lib /DISALLOWLIB:libcpmt$(VBOX_VCC_CRT_TYPE).lib, $(TEMPLATE_VBOXR3EXE_LDFLAGS)) \
     
    77777783endif
    77787784TEMPLATE_VBOXGUESTR3EXE_INST      = $(INST_ADDITIONS)
    7779 TEMPLATE_VBOXGUESTR3EXE_DEFS     := $(filter-out $(ARCH_BITS_DEFS) VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R3, $(TEMPLATE_VBOXR3EXE_DEFS)) IN_GUEST IN_GUEST_R3 IN_RT_R3 $(VBOX_GC_ARCH_BITS_DEFS) RT_NEED_NEW_AND_DELETE
     7785TEMPLATE_VBOXGUESTR3EXE_DEFS     := \
     7786        $(filter-out $(ARCH_BITS_DEFS) VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R3, $(TEMPLATE_VBOXR3EXE_DEFS)) \
     7787        IN_GUEST \
     7788        IN_GUEST_R3 \
     7789        IN_RT_R3 \
     7790        IN_RT_STATIC \
     7791        $(VBOX_GC_ARCH_BITS_DEFS) \
     7792        RT_NEED_NEW_AND_DELETE
    77807793TEMPLATE_VBOXGUESTR3EXE_DEFS.linux := $(TEMPLATE_VBOXR3EXE_DEFS.linux) LOG_USE_C99 RT_WITHOUT_EXEC_ALLOC
    77817794ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux.
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