VirtualBox

Changeset 3255 in kBuild


Ignore:
Timestamp:
Jan 2, 2019 7:14:57 PM (6 years ago)
Author:
bird
Message:

GXX3: Make precompiled headers work with the compiler cache. Though, it turns out to be slower with gcc 8.2.x than regular build w/o precompiled headers, but just to be feature complete...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kBuild/tools/GXX3.kmk

    r3254 r3255  
    164164# @param    $(source)   Source filename (relative).
    165165# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
    166 # @param    $(dep)          Dependcy file. This shall be (re)created by the compilation.
     166# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
    167167# @param    $(flags)    Flags.
    168168# @param    $(defs)     Definitions. No -D or something.
    169169# @param    $(incs)     Includes. No -I or something.
    170170# @param    $(dirdep)   Directory creation dependency.
    171 # @param    $(deps)             Other dependencies.
     171# @param    $(deps)     Other dependencies.
    172172# @param    $(outbase)  Output basename (full). Use this for list files and such.
    173173# @param    $(objsuff)  Object suffix.
     174TOOL_GXX3_COMPILE_CXX_DEPEND = $($(target)_1_GCC_PCH_FILE)
    174175TOOL_GXX3_COMPILE_CXX_DEPORD =
    175176ifdef KBUILD_USE_KOBJCACHE
    176177TOOL_GXX3_COMPILE_CXX_USES_KOBJCACHE = 1
    177 TOOL_GXX3_COMPILE_CXX_DEPEND =
    178178TOOL_GXX3_COMPILE_CXX_OUTPUT = $(outbase).ii
    179179define TOOL_GXX3_COMPILE_CXX_CMDS
    180180        $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
    181181                --kObjCache-cpp $(outbase).ii\
    182                 $(TOOL_GXX3_CXX) -E -o -\
     182                $(TOOL_GXX3_CXX) -E -o - $(if-expr defined($(target)_PCH_HDR)\
     183                ,-fpch-preprocess -Winvalid-pch -I$($(target)_1_GCC_PCH_DIR) -include $(basename $($(target)_1_GCC_PCH_FILE)),)\
    183184                $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
    184185                -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
     
    186187                --kObjCache-cc $(obj)\
    187188                $(TOOL_GXX3_CXX) -c\
    188                 $(flags) -fpreprocessed -x c++\
     189                $(flags) -fpreprocessed $(if-expr defined($(target)_PCH_HDR),-fpch-preprocess,) -x c++\
    189190                -o $(obj)\
    190191                -
     
    192193endef
    193194else # !KBUILD_USE_KOBJCACHE
    194 TOOL_GXX3_COMPILE_CXX_DEPEND = $($(target)_1_GCC_PCH_FILE)
    195195TOOL_GXX3_COMPILE_CXX_OUTPUT =
    196196define TOOL_GXX3_COMPILE_CXX_CMDS
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