VirtualBox

Changeset 60512 in vbox for trunk


Ignore:
Timestamp:
Apr 14, 2016 11:47:11 PM (9 years ago)
Author:
vboxsync
Message:

Config.kmk: Counteract /DEBUG bloating effects, saving MBs for the larger binaries. Just noticed going over the documentation that the /DEBUG msvc linker option disables a couple of linker options responsible for stripping dead code and combining COMDAT stuff (or something to that effect). So, enable it these optimization explicitly after the /DEBUG option. My release bin directory went from 213MB to 190MB, VirtualBox.exe dropping more than 2MB.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r60425 r60512  
    35443544  TEMPLATE_VBoxRc_CFLAGS             = $(TEMPLATE_VBoxRc_CXXFLAGS)
    35453545  TEMPLATE_VBoxRc_LDFLAGS            =  -Ignore:4197 \
    3546         -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug \
     3546        -Driver -Subsystem:NATIVE -Incremental:NO -Align:64 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug -Opt:Ref -Opt:Icf \
    35473547        -Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    35483548        -Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
     
    36093609 ifeq ($(VBOX_LDR_FMT32),pe)
    36103610  TEMPLATE_VBoxRcExe_LDFLAGS = -Ignore:4197 \
    3611         -Incremental:NO -MapInfo:Exports -NoD -Debug \
     3611        -Incremental:NO -MapInfo:Exports -NoD -Debug -Opt:Ref -Opt:Icf \
    36123612        -Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    36133613        -Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
     
    36803680TEMPLATE_VBoxR0_CFLAGS              = $(TEMPLATE_VBoxR0_CXXFLAGS)
    36813681TEMPLATE_VBoxR0_LDFLAGS             = -Ignore:4197 \
    3682         -Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug \
     3682        -Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD $(VBOX_VCC_LD_WERR) -Release -Debug -Opt:Ref -Opt:Icf \
    36833683        -Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    36843684        -Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
     
    37873787 TEMPLATE_VBOXR0DRV_CFLAGS             = $(TEMPLATE_VBOXR0DRV_CXXFLAGS)
    37883788 TEMPLATE_VBOXR0DRV_LDFLAGS            = -Ignore:4197 \
    3789         -Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD -Release -Debug \
     3789        -Driver -Subsystem:NATIVE -Incremental:NO -Align:4096 -MapInfo:Exports -NoD -Release -Debug -Opt:Ref -Opt:Icf \
    37903790        -Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    37913791        -Stub:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
     
    40804080 TEMPLATE_VBOXR3EXE_CFLAGS.kprofile    = $(TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile)
    40814081 TEMPLATE_VBOXR3EXE_LDFLAGS            = -Ignore:4197 \
    4082         /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug \
     4082        /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug /Opt:Ref /Opt:Icf \
    40834083        /Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    40844084        /STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com \
     
    48434843 TEMPLATE_VBOXMAINEXE_CFLAGS.kprofile    = $(TEMPLATE_VBOXMAINEXE_CXXFLAGS.kprofile)
    48444844 TEMPLATE_VBOXMAINEXE_LDFLAGS            = -Ignore:4197 \
    4845         /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug \
     4845        /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug /Opt:Ref /Opt:Icf \
    48464846        /Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    48474847        /STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com \
     
    53625362        $(PATH_TOOL_$(VBOX_VCC_TOOL)_ATLMFC_INC)
    53635363  TEMPLATE_VBOXQTGUIEXE_LDFLAGS = -Ignore:4197 \
    5364         /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug \
     5364        /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug /Opt:Ref /Opt:Icf \
    53655365        /Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    53665366        /STUB:$(PATH_ROOT)/src/VBox/HostDrivers/Support/win/winstub.com
     
    55775577 TEMPLATE_VBoxBldProg_CFLAGS.kprofile    = $(TEMPLATE_VBoxBldProg_CXXFLAGS.kprofile)
    55785578 TEMPLATE_VBoxBldProg_LDFLAGS            = -Ignore:4197 \
    5579         /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug \
     5579        /NOD /INCREMENTAL:NO /MAPINFO:EXPORTS /LargeAddressAware /DynamicBase /NxCompat /Release /Debug /Opt:Ref /Opt:Icf \
    55805580        /Version:$(VBOX_VERSION_MAJOR)0$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \
    55815581        /DISALLOWLIB:libc$(VBOX_VCC_CRT_TYPE_N).lib \
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