VirtualBox

Ignore:
Timestamp:
Jul 5, 2024 12:02:04 PM (5 months ago)
Author:
vboxsync
Message:

*.kmk,bldprogs/VBoxPeSetVersion: Created a unit for setting the PE version so it can more easily be controlled per target. This is helpful with the two GINA targets in the additions, since using NT 3.51 instead of NT 3.1 as minimum avoids trouble with some AV heuristics.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/tools/kBuildUnits/vboxsetpeversion.kmk

    r105131 r105160  
    11# $Id$
    22## @file
    3 # VBox import checker unit.
     3# VBox PE version setter unit.
    44#
    55
    66#
    7 # Copyright (C) 2017-2023 Oracle and/or its affiliates.
     7# Copyright (C) 2017-2024 Oracle and/or its affiliates.
    88#
    99# This file is part of VirtualBox base platform packages, as
     
    2626#
    2727
    28 UNIT_vboximportchecker = bldRTLdrCheckImports
     28UNIT_vboxsetpeversion = VBoxPeSetVersion
    2929
    3030# Add our property.
    31 PROPS_SINGLE          += VBOX_IMPORT_CHECKER
    32 PROPS_SINGLE_LNK      += VBOX_IMPORT_CHECKER
    33 PROPS_PROGRAMS_SINGLE += VBOX_IMPORT_CHECKER
    34 PROPS_DLLS_SINGLE     += VBOX_IMPORT_CHECKER
    35 PROPS_SYSMODS_SINGLE  += VBOX_IMPORT_CHECKER
     31PROPS_SINGLE          += VBOX_SET_PE_VERSION
     32PROPS_SINGLE_LNK      += VBOX_SET_PE_VERSION
     33PROPS_PROGRAMS_SINGLE += VBOX_SET_PE_VERSION
     34PROPS_DLLS_SINGLE     += VBOX_SET_PE_VERSION
     35PROPS_SYSMODS_SINGLE  += VBOX_SET_PE_VERSION
    3636
    3737# Helper for expanding certain variables while assigning.
    38 define def_unit_vboximportchecker_internal_expand_twice
    39  $(target)_POST_CMDS += $$(if-expr "$$(tool_do)" != "LINK_LIBRARY",$$(NLTAB)$$(VBOX_RTLDRCHECKIMPORTS) -q -p "$$(KBUILD_DEVTOOLS)/$(bld_trg).$(bld_trg_arch)/exports/$$($(target)_2_VBOX_IMPORT_CHECKER)" $$(out),)
     38define def_unit_vboxsetpeversion_internal_expand_twice
     39 $(target)_POST_CMDS += $$(NLTAB)$$(VBOX_PE_SET_VERSION) $$(addprefix --,$$($(target)_2_VBOX_SET_PE_VERSION)) "$$(out)"
    4040endef
    4141
    42 define def_unit_vboximportchecker_target_pre
    43  # Do not apply to ASAN builds as it requires newere DLLs.
    44  ifneq ($(KBUILD_TYPE),asan)
     42define def_unit_vboxsetpeversion_target_pre
    4543
    46   # Set pass 2 variable (simpler) and act on it.
    47   $(target)_2_VBOX_IMPORT_CHECKER := $(evalcall def_fn_prop_get_first_defined,VBOX_IMPORT_CHECKER)
    48   ifdef $(target)_2_VBOX_IMPORT_CHECKER
    49    $(target)_LNK_ORDERDEPS += $(VBOX_RTLDRCHECKIMPORTS)
    50    $(eval $(def_unit_vboximportchecker_internal_expand_twice))
     44 # Set pass 2 variable (simpler) and act on it.
     45 $(target)_2_VBOX_SET_PE_VERSION := $(evalcall def_fn_prop_get_first_defined,VBOX_SET_PE_VERSION)
     46 ifdef $(target)_2_VBOX_SET_PE_VERSION
     47  ifneq ($(tool_do),LINK_LIBRARY)
     48   $(target)_LNK_ORDERDEPS += $(VBOX_PE_SET_VERSION)
     49   $(eval $(def_unit_vboxsetpeversion_internal_expand_twice))
    5150  endif
    52 
    5351 endif
    5452
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