Ignore:
Timestamp:
Jan 28, 2015, 7:17:54 PM (10 years ago)
Author:
bird
Message:

Use evalvalctx instead of evalval for most of the target processing to make sure there isn't leakage between tragets via supposedly local variables (which ended up being local at the foreach level instead of the evalval level). Avoid troubles like we had in def_pass1_link_common when PDBs was installed but not the actual binary, we ended up using the $(inst) value from the previous run. (VBoxDrv.sys w/ signing enabled.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/footer-pass2-compiling-targets.kmk

    r2726 r2762  
    271271        $($(target)_SOURCES.$(bld_trg_cpu))\
    272272        $($(target)_SOURCES.$(bld_type))\
    273         ,$(evalval def_src_handler_one) )
     273        ,$(evalvalctx def_src_handler_one) )
    274274
    275275$(foreach source,\
     
    282282        $($(target)_GEN_SOURCES_.$(bld_trg_cpu))\
    283283        $($(target)_GEN_SOURCES_.$(bld_type))\
    284         ,$(evalval def_src_handler_one) )
     284        ,$(evalvalctx def_src_handler_one) )
    285285endef # def_target_sources
    286286$(eval-opt-var def_target_sources)
     
    407407  local debug_install_cmd := $(INSTALL)
    408408  local debug_var         := INSTALL
    409   $(foreach debug_inst, $($(target)_1_DEBUG_INST), $(evalval def_target_install_only_debug))
     409  $(foreach debug_inst, $($(target)_1_DEBUG_INST), $(evalvalctx def_target_install_only_debug))
    410410 endif
    411411
     
    414414 local debug_var          := STAGE
    415415 if1of ($($(target)_1_DEBUG_INSTTYPE), stage both)
    416   $(foreach debug_inst, $($(target)_1_DEBUG_STAGE), $(evalval def_target_install_only_debug))
     416  $(foreach debug_inst, $($(target)_1_DEBUG_STAGE), $(evalvalctx def_target_install_only_debug))
    417417 endif
    418418 if1of ($($(target)_1_INSTTYPE), stage both)
    419419  ifndef debug_nostage
    420    $(foreach debug_inst,$($(target)_1_STAGE), $(evalval def_target_install_only_debug))
     420   $(foreach debug_inst,$($(target)_1_STAGE), $(evalvalctx def_target_install_only_debug))
    421421  endif
    422422 endif
     
    489489        $($(target)_USES.$(bld_type))\
    490490        $($(target)_USES)
    491 $(foreach unit,$(units),$(evalval def_unit_$(unit)_target_pre))
     491$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre))
    492492
    493493# source -> object
     
    629629tool_do := LINK_LIBRARY
    630630mode := 0644
    631 $(foreach target, $(_ALL_LIBRARIES), $(evalval def_lib))
     631$(foreach target, $(_ALL_LIBRARIES), $(evalvalctx def_lib))
    632632
    633633ifdef KBUILD_PROFILE_SELF
     
    692692        $($(target)_USES.$(bld_type))\
    693693        $($(target)_USES)
    694 $(foreach unit,$(units),$(evalval def_unit_$(unit)_target_pre))
     694$(foreach unit,$(units),$(evalvalctx def_unit_$(unit)_target_pre))
    695695
    696696# source -> object
     
    968968mode    := 0755
    969969bld_trg_base_var := PLATFORM
    970 $(foreach target, $(_ALL_BLDPROGS), $(evalval def_link_common))
     970$(foreach target, $(_ALL_BLDPROGS), $(evalvalctx def_link_common))
    971971
    972972ifdef KBUILD_PROFILE_SELF
     
    986986mode    := 0644
    987987bld_trg_base_var := TARGET
    988 $(foreach target, $(_ALL_DLLS), $(evalval def_link_common))
     988$(foreach target, $(_ALL_DLLS), $(evalvalctx def_link_common))
    989989
    990990ifdef KBUILD_PROFILE_SELF
     
    10061006 EXT     := LIB
    10071007 tool_do := LINK_LIBRARY
    1008  $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_lib))
     1008 $(foreach target, $(_ALL_IMPORT_LIBS), $(evalvalctx def_lib))
    10091009else
    10101010 EXT     := DLL
    10111011 tool_do := LINK_DLL
    1012  $(foreach target, $(_ALL_IMPORT_LIBS), $(evalval def_link_common))
     1012 $(foreach target, $(_ALL_IMPORT_LIBS), $(evalvalctx def_link_common))
    10131013endif
    10141014
     
    10291029mode    := 0755
    10301030bld_trg_base_var := TARGET
    1031 $(foreach target, $(_ALL_PROGRAMS), $(evalval def_link_common))
     1031$(foreach target, $(_ALL_PROGRAMS), $(evalvalctx def_link_common))
    10321032
    10331033ifdef KBUILD_PROFILE_SELF
     
    10471047mode    := 0644
    10481048bld_trg_base_var := TARGET
    1049 $(foreach target, $(_ALL_SYSMODS), $(evalval def_link_common))
     1049$(foreach target, $(_ALL_SYSMODS), $(evalvalctx def_link_common))
    10501050
    10511051ifdef KBUILD_PROFILE_SELF
     
    10651065mode    := 0644
    10661066bld_trg_base_var := TARGET
    1067 $(foreach target, $(_ALL_MISCBINS), $(evalval def_link_common))
     1067$(foreach target, $(_ALL_MISCBINS), $(evalvalctx def_link_common))
    10681068
    10691069ifdef KBUILD_PROFILE_SELF
Note: See TracChangeset for help on using the changeset viewer.