Ignore:
Timestamp:
Sep 16, 2015, 1:35:37 AM (10 years ago)
Author:
bird
Message:

footer-pass2-compiling-targets.kmk,VCC100*: Introducing linker output variable OUTPUT_MAYBE_PRECIOUS for files that shouldn't be unconditionally deleted prior to linking. This way it's possible to keep the PATH_STAGE_LIB copy of an import library and only update it when there are real changes to the exports of the DLL we're linking, thus avoiding a relinking cascade.

File:
1 edited

Legend:

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

    r2762 r2795  
    129129# @param    $($(target)_2_OUTPUT)   Output files from the link.
    130130# @param    $($(target)_2_OUTPUT_MAYBE) Output files that the link may perhaps create.
     131# @param    $($(target)_2_OUTPUT_MAYBE_PRECIOUS)        Output files that the link may perhaps create but shouldn't be deleted.
    131132# @param    $($(target)_2_DEPEND)   Dependencies.
    132133# @param    $($(target)_2_DEPORD)   Dependencies which should only affect build order.
     
    142143+ $($(target)_2_OUTPUT_DEBUG_FILES) \
    143144+ $($(target)_2_OUTPUT_DEBUG_DIRS) \
    144 +| $($(target)_2_OUTPUT_MAYBE) : \
     145+| $($(target)_2_OUTPUT_MAYBE) $($(target)_2_OUTPUT_MAYBE_PRECIOUS) : \
    145146                $$$$($(target)_2_DEPEND) \
    146147                $(value _DEP_LINK_CMDS) \
     
    607608$(target)_2_OUTPUT := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT)
    608609$(target)_2_OUTPUT_MAYBE := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT_MAYBE)
     610$(target)_2_OUTPUT_MAYBE_PRECIOUS := $(TOOL_$(tool)_LINK_LIBRARY_OUTPUT_MAYBE_PRECIOUS)
    609611$(target)_2_DEPEND := $(TOOL_$(tool)_LINK_LIBRARY_DEPEND) $(deps) $($(target)_2_OBJS)
    610612$(target)_2_DEPORD := $(TOOL_$(tool)_LINK_LIBRARY_DEPORD) $(dirdep) $(orderdeps)
     
    617619$(evalval def_target_install_only)
    618620
    619 _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out)
     621_OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $($(target)_2_OUTPUT_MAYBE_PRECIOUS) $(out)
    620622_CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type))
    621623_DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type))
     
    929931$(target)_2_OUTPUT              := $(TOOL_$(tool)_$(tool_do)_OUTPUT)
    930932$(target)_2_OUTPUT_MAYBE        := $(TOOL_$(tool)_$(tool_do)_OUTPUT_MAYBE)
     933$(target)_2_OUTPUT_MAYBE_PRECIOUS := $(TOOL_$(tool)_$(tool_do)_OUTPUT_MAYBE_PRECIOUS)
    931934if1of ($(ld_debug), split)
    932935 $(target)_2_OUTPUT_DEBUG_FILES := $(filter-out %/,$(TOOL_$(tool)_$(tool_do)_OUTPUT_DEBUG))
     
    948951# Update globals.
    949952_OBJS += $($(target)_2_OBJS)
    950 _OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $(out)
     953_OUT_FILES += $($(target)_2_OUTPUT) $($(target)_2_OUTPUT_MAYBE) $($(target)_2_OUTPUT_MAYBE_PRECIOUS) $(out)
    951954_CLEAN_FILES += $($(target)_CLEAN) $($(target)_CLEAN.$(bld_trg)) $($(target)_CLEAN.$(bld_trg).$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_arch)) $($(target)_CLEAN.$(bld_trg_cpu)) $($(target)_CLEAN.$(bld_type))
    952955_DIRS += $($(target)_BLDDIRS) $($(target)_BLDDIRS.$(bld_trg)) $($(target)_BLDDIRS.$(bld_trg).$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_arch)) $($(target)_BLDDIRS.$(bld_trg_cpu)) $($(target)_BLDDIRS.$(bld_type))
Note: See TracChangeset for help on using the changeset viewer.