Changeset 3250
- Timestamp:
- Dec 28, 2018, 11:43:52 PM (6 years ago)
- Location:
- trunk/kBuild
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/kBuild/header.kmk ¶
r3166 r3250 1090 1090 ## PROPS_TOOLS 1091 1091 # This is a subset of PROPS_SINGLE. 1092 PROPS_TOOLS := TOOL CTOOL CXXTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL1092 PROPS_TOOLS := TOOL CTOOL CXXTOOL PCHTOOL OBJCTOOL OBJCXXTOOL ASTOOL RCTOOL ARTOOL LDTOOL FETCHTOOL UNPACKTOOL PATCHTOOL 1093 1093 1094 1094 ## PROPS_SINGLE … … 1097 1097 # will do the necessary inheritance for templates, sdks, tools and targets. 1098 1098 PROPS_SINGLE := $(PROPS_TOOLS) TEMPLATE INSTTYPE INST STAGE NOINST BLD_TYPE BLD_TRG BLD_TRG_ARCH BLD_TRG_CPU FETCHDIR \ 1099 OBJSUFF COBJSUFF CXXOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \1099 OBJSUFF COBJSUFF CXXOBJSUFF PCHOBJSUFF OBJCOBJSUFF OBJCXXOBJSUFF ASOBJSUFF RCOBJSUFF SYSSUFF BINSUFF EXESUFF DLLSUFF LIBSUFF ARLIBSUFF \ 1100 1100 MODE UID GID LD_DEBUG DEBUG_INSTTYPE DEBUG_INST DEBUG_STAGE 1101 1101 ## PROPS_SINGLE_LNK … … 1120 1120 CFLAGS CDEFS \ 1121 1121 CXXFLAGS CXXDEFS \ 1122 PCHFLAGS PCHDEFS \ 1122 1123 OBJCFLAGS OBJCDEFS \ 1123 1124 OBJCXXFLAGS OBJCXXDEFS \ … … 1138 1139 PROPS_ACCUMULATE_L := \ 1139 1140 SDKS USES SOURCES EXEC_SOURCES SRC_HANDLERS INTERMEDIATES \ 1140 INCS CINCS CXXINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \1141 INCS CINCS CXXINCS PCHINCS OBJCINCS OBJCXXINCS ASINCS RCINCS \ 1141 1142 LIBS LIBPATH \ 1142 1143 DIRS BLDDIRS CLEAN … … 1208 1209 ## KBUILD_COMPILE_CATEGTORIES 1209 1210 # Tools categories for compiling. 1210 KBUILD_COMPILE_CATEGTORIES := AS C CXX OBJC OBJCXX RC1211 KBUILD_COMPILE_CATEGTORIES := AS C CXX PCH OBJC OBJCXX RC 1211 1212 1212 1213 ## KBUILD_GENERIC_CATEGORIES -
TabularUnified trunk/kBuild/tools/GXX3.kmk ¶
r3121 r3250 37 37 TOOL_GXX3_CC ?= gcc$(HOSTSUFF_EXE) 38 38 TOOL_GXX3_CXX ?= g++$(HOSTSUFF_EXE) 39 TOOL_GXX3_PCH ?= $(TOOL_GXX3_CXX) 39 40 TOOL_GXX3_AS ?= gcc$(HOSTSUFF_EXE) 40 41 ifeq ($(KBUILD_TARGET),solaris) … … 73 74 TOOL_GXX3_CC += -fmessage-length=0 74 75 TOOL_GXX3_CXX += -fmessage-length=0 76 TOOL_GXX3_PCH += -fmessage-length=0 75 77 endif 76 78 … … 85 87 86 88 TOOL_GXX3_CXXOBJSUFF ?= .o 87 TOOL_GXX3_CXXOBJSUFF ?= .o88 89 TOOL_GXX3_CXXFLAGS ?= 89 90 TOOL_GXX3_CXXFLAGS.debug ?= -g … … 92 93 TOOL_GXX3_CXXINCS ?= 93 94 TOOL_GXX3_CXXDEFS ?= 95 96 TOOL_GXX3_PCHOBJSUFF ?= .h.gch 97 TOOL_GXX3_PCHFLAGS ?= $(TOOL_GXX3_CXXFLAGS) 98 TOOL_GXX3_PCHFLAGS.debug ?= $(TOOL_GXX3_CXXFLAGS.debug) 99 TOOL_GXX3_PCHFLAGS.profile ?= $(TOOL_GXX3_CXXFLAGS.profile) 100 TOOL_GXX3_PCHFLAGS.release ?= $(TOOL_GXX3_CXXFLAGS.release) 101 TOOL_GXX3_PCHINCS ?= $(TOOL_GXX3_CXXINCS) 102 TOOL_GXX3_PCHDEFS ?= $(TOOL_GXX3_CXXDEFS) 94 103 95 104 TOOL_GXX3_ASFLAGS ?= -x assembler-with-cpp … … 163 172 # @param $(outbase) Output basename (full). Use this for list files and such. 164 173 # @param $(objsuff) Object suffix. 165 TOOL_GXX3_COMPILE_CXX_DEPEND =166 174 TOOL_GXX3_COMPILE_CXX_DEPORD = 167 175 ifdef KBUILD_USE_KOBJCACHE 168 176 TOOL_GXX3_COMPILE_CXX_USES_KOBJCACHE = 1 177 TOOL_GXX3_COMPILE_CXX_DEPEND = 169 178 TOOL_GXX3_COMPILE_CXX_OUTPUT = $(outbase).ii 170 179 define TOOL_GXX3_COMPILE_CXX_CMDS … … 183 192 endef 184 193 else # !KBUILD_USE_KOBJCACHE 194 TOOL_GXX3_COMPILE_CXX_DEPEND = $($(target)_1_GCC_PCH_FILE) 185 195 TOOL_GXX3_COMPILE_CXX_OUTPUT = 186 196 define TOOL_GXX3_COMPILE_CXX_CMDS 187 197 $(QUIET)$(TOOL_GXX3_CXX) -c\ 188 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ 189 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 190 -o $(obj)\ 198 $(flags) $(addprefix -I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(addprefix -D, $(defs))\ 199 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 200 -o $(obj) $(if-expr defined($(target)_PCH_HDR) \ 201 ,-Winvalid-pch -H -include $(basename $($(target)_1_GCC_PCH_FILE)),) \ 191 202 $(abspath $(source)) 192 203 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" 193 204 endef 194 205 endif # !KBUILD_USE_KOBJCACHE 206 207 208 ## Precompile C++ header. 209 # @param $(target) Normalized main target name. 210 # @param $(source) Source filename (relative). 211 # @param $(obj) Object file name. This shall be (re)created by the compilation. 212 # @param $(dep) Dependcy file. This shall be (re)created by the compilation. 213 # @param $(flags) Flags. 214 # @param $(defs) Definitions. No -D or something. 215 # @param $(incs) Includes. No -I or something. 216 # @param $(dirdep) Directory creation dependency. 217 # @param $(deps) Other dependencies. 218 # @param $(outbase) Output basename (full). Use this for list files and such. 219 # @param $(objsuff) Object suffix. 220 TOOL_GXX3_COMPILE_PCH_DEPORD = $($(target)_1_GCC_PCH_DIR) 221 TOOL_GXX3_COMPILE_PCH_DEPEND = 222 TOOL_GXX3_COMPILE_PCH_OUTPUT = $($(target)_1_GCC_PCH_FILE) 223 define TOOL_GXX3_COMPILE_PCH_CMDS 224 $(QUIET)$(TOOL_GXX3_PCH) -c\ 225 $(flags) $(addprefix -I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(addprefix -D, $(defs))\ 226 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\ 227 -o $(obj)\ 228 $(abspath $(source)) 229 $(INSTALL) --hard-link-files-when-possible -m 0644 -- "$(obj)" "$($(target)_1_GCC_PCH_FILE)" 230 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" "" 231 endef 195 232 196 233 -
TabularUnified trunk/kBuild/units/gccprecomp.kmk ¶
r3247 r3250 1 1 # $Id$ 2 2 ## @file 3 # kBuild Unit - Target Level Precompiled Headers for Visual C++.3 # kBuild Unit - Target Level Precompiled Headers for GNU GCC. 4 4 # 5 5 … … 33 33 34 34 35 UNIT_ vccprecomp = Target level precompiled Headers for Visual C++35 UNIT_gccprecomp = Target level precompiled Headers for Visual C++ 36 36 37 37 # 38 38 # Early target processing pass #1. 39 39 # 40 # This set the internal _VCC_PCH_FILE and VCC_COMMON_OBJ_PDB properties, 41 # which will be picked up by the VCCxxx tool. 40 # This sets $(target)_1_GCC_PCH_DIR as the include directory for the precompiled 41 # header, adding it to BLDDIRS to get a mkdir rule for it, and then calculates the 42 # .gch name and stores that in $(target)_1_GCC_PCH_FILE for compile rule dependencies. 42 43 # 43 define def_unit_vccprecomp_target_pre 44 $(target)_1_VCC_PCH_FILE := $(outbase)-pch.pch 45 $(target)_1_VCC_COMMON_OBJ_PDB := $(outbase)-common-obj.pdb 44 define def_unit_gccprecomp_target_pre 45 $(target)_BLDDIRS += $($(target)_0_OUTDIR)/pch/ 46 $(target)_1_GCC_PCH_DIR := $($(target)_0_OUTDIR)/pch/ 47 $(target)_1_GCC_PCH_FILE := $($(target)_0_OUTDIR)/pch/$(notdir $($(target)_PCH_HDR)).gch 46 48 endef 47 49 … … 49 51 # Early target processing pass #2. 50 52 # 51 # This sets up a rule for creating the . pch file after qt5 and similar units53 # This sets up a rule for creating the .gch file after qt5 and similar units 52 54 # are done modifying INCS, DEFS and company. The 'tool' variable is defined by 53 55 # footer-pass2-compiling-targets.kmk and is really the LD tool, but that'll 54 # have to do for now. The '-PCH' variant of the VCCtool, is defined together56 # have to do for now. The '-PCH' variant of the GCC/LLVM tool, is defined together 55 57 # with $(tool) and allow us to bypass the options and dependencies triggered 56 58 # by _1_VCC_PCH_FILE, _1_VCC_COMMON_OBJ_PDB and _PCH_HDR, and also make sure we 57 59 # don't get circular dependencies by way of kDepObj and the debug info. 58 60 # 59 define def_unit_ vccprecomp_target_pre_261 define def_unit_gccprecomp_target_pre_2 60 62 local source := $($(target)_PCH_HDR) 61 $(source)_TOOL := $(tool)-PCH62 63 local suff := $(suffix $(source)) 63 local type := CXX64 local type := PCH 64 65 $(kb-src-one 2) 65 66 endef
Note:
See TracChangeset
for help on using the changeset viewer.