Changeset 3135


Ignore:
Timestamp:
Mar 1, 2018, 7:45:26 PM (7 years ago)
Author:
bird
Message:

kmk_append: Extended it with an -i parameter that enables looking for --insert-variable=xxx and --inserv-command=xxx. This allows us to merge the kmk_builtin_append commands at the end of each compilation, which significantly (e.g. 1m4s -> 37s) speeds up builds on windows and its dead slow file system.

File:
1 edited

Legend:

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

    r3128 r3135  
    4747else
    4848 _DEP_COMPILE_CMDS =
     49endif
     50
     51
     52## Temporary for the compile rule below.
     53if "$(KBUILD_KMK_REVISION)" >= 3134
     54 KBUILD_HAVE_OPTIMIZED_APPEND := 1
    4955endif
    5056
     
    9298
    9399ifndef NO_COMPILE_CMDS_DEPS
    94         %$$(QUIET2)$$(APPEND) '$(dep)'
    95         %$$(QUIET2)$$(APPEND) '$(dep)' 'define $(target)_$(subst :,_,$(source))_CMDS_PREV_'
     100 ifdef KBUILD_HAVE_OPTIMIZED_APPEND
     101        %$$(QUIET2)$$(APPEND) -in '$(dep)' \
     102                '' \
     103                'define $(target)_$(subst :,_,$(source))_CMDS_PREV_' \
     104                '--insert-command=$(obj)' \
     105                'endef'
     106 else
     107        %$$(QUIET2)$$(APPEND) -n '$(dep)' '' 'define $(target)_$(subst :,_,$(source))_CMDS_PREV_'
    96108        %$$(QUIET2)$$(APPEND) -c '$(dep)' '$(obj)'
    97109        %$$(QUIET2)$$(APPEND) '$(dep)' 'endef'
     110 endif
    98111endif
    99112
Note: See TracChangeset for help on using the changeset viewer.