Index: /trunk/kBuild/tools/VCC143-CLANGXX.kmk
===================================================================
--- /trunk/kBuild/tools/VCC143-CLANGXX.kmk	(revision 3624)
+++ /trunk/kBuild/tools/VCC143-CLANGXX.kmk	(revision 3624)
@@ -0,0 +1,559 @@
+# $Id$
+## @file
+# kBuild Tool Config - LLVM Clang v17.0.x shipping with Visual C++ 14.3 (/ 2022 / MSC v19.30+), for building C++ code.
+#
+# @note This is the pure Clang/LLVM stuff. We're not using the clang-cl frontend here.
+#
+# @todo This is rather untested/incomplete. Only the assembler bit is currently
+#       in active use.
+#
+
+#
+# Copyright (c) 2004-2024 knut st. osmundsen <bird-kBuild-spam-xviiv@anduin.net>
+#
+# This file is part of kBuild.
+#
+# kBuild is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# kBuild is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with kBuild; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#
+# As a special exception you are granted permission to include this file, via
+# the kmk include directive, as you wish without this in itself causing the
+# resulting makefile, program or whatever to be covered by the GPL license.
+# This exception does not however invalidate any other reasons why the makefile,
+# program, whatever should not be covered the GPL.
+#
+#
+
+TOOL_VCC143-CLANGXX := LLVM Clang v17.0.x shipping with Visual C++ 14.3 (/ 2022 / MSC v19.30+), for building C++ code.
+
+ifndef TOOL_VCC143
+ include $(KBUILD_PATH)/tools/VCC143.kmk
+endif
+
+
+#
+# Tool Specific Properties
+#
+
+# The path is relative to the VCC143 one.
+ifdef PATH_TOOL_VCC143
+ PATH_TOOL_VCC143-CLANGXX_LLVM := $(PATH_TOOL_VCC143-CLANGXX_LLVM)
+endif
+ifeq ($(PATH_TOOL_VCC143-CLANGXX_LLVM),)
+ ifeq ($(tolower $(substr $(qdir u,$(PATH_TOOL_VCC143)), -12)),/tools/msvc/)
+  PATH_TOOL_VCC143-CLANGXX_LLVM := $(firstfile $(qwildcard ,$(substr $(qdir ,$(PATH_TOOL_VCC143)),1,-6)/Llvm))
+ else
+  PATH_TOOL_VCC143-CLANGXX_LLVM := $(qabspath ,$(firstfile $(qwildcard ,\
+	$(PATH_TOOL_VCC143)/Tools/Llvm \
+	$(PATH_TOOL_VCC143)/../Tools/Llvm \
+	$(PATH_TOOL_VCC143)/../../Tools/Llvm \
+	$(PATH_TOOL_VCC143)/../../../Tools/Llvm \
+	$(PATH_TOOL_VCC143)/../../../../Tools/Llvm)))
+  endif
+  ifeq ($(PATH_TOOL_VCC143-CLANGXX_LLVM),)
+   PATH_TOOL_VCC143-CLANGXX_LLVM := $(PATH_TOOL_VCC143)/../../Llvm
+   $(warning kBuild: PATH_TOOL_VCC143-CLANGXX_LLVM cannot be determined! Using "$(PATH_TOOL_VCC143-CLANGXX_LLVM)" as placeholder)
+  endif
+endif
+
+# The directories for each host / target architecture.
+PATH_TOOL_VCC143-CLANGXX_LLVM_ARCH.x86   = $(PATH_TOOL_VCC143-CLANGXX_LLVM)
+PATH_TOOL_VCC143-CLANGXX_LLVM_ARCH.amd64 = $(PATH_TOOL_VCC143-CLANGXX_LLVM)/x64
+PATH_TOOL_VCC143-CLANGXX_LLVM_ARCH.arm32 = $(PATH_TOOL_VCC143-CLANGXX_LLVM)/ARM
+PATH_TOOL_VCC143-CLANGXX_LLVM_ARCH.arm64 = $(PATH_TOOL_VCC143-CLANGXX_LLVM)/ARM64
+
+# PREFIX/SUFFIX: clang;   PREFIX2/SUFFIX2: llvm-;
+ifndef TOOL_VCC143-CLANGXX_PREFIX
+ TOOL_VCC143-CLANGXX_PREFIX   := $(requote sh,$(PATH_TOOL_VCC143-CLANGXX_LLVM_ARCH.$(KBUILD_HOST_ARCH))/bin/)
+endif
+ifndef TOOL_VCC143-CLANGXX_SUFFIX
+ TOOL_VCC143-CLANGXX_SUFFIX   := $(HOSTSUFF_EXE)
+endif
+TOOL_VCC143-CLANGXX_PREFIX2   ?= $(TOOL_VCC143-CLANGXX_PREFIX)
+TOOL_VCC143-CLANGXX_SUFFIX2   ?= $(TOOL_VCC143-CLANGXX_SUFFIX)llvm-
+TOOL_VCC143-CLANGXX_CC        ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_CXX       ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang++$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_PCH       ?= $(TOOL_VCC143-CLANGXX_CXX)
+TOOL_VCC143-CLANGXX_OBJC      ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_OBJCXX    ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_AS        ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_LD        ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang++$(TOOL_VCC143-CLANGXX_SUFFIX)
+TOOL_VCC143-CLANGXX_LD_SYSMOD ?= $(TOOL_VCC143-CLANGXX_PREFIX)clang++$(TOOL_VCC143-CLANGXX_SUFFIX)
+#TOOL_VCC143-CLANGXX_LDFLAGS.dll ?= -dynamiclib
+#TOOL_VCC143-CLANGXX_LDFLAGS.sysmod ?= -r
+#TOOL_VCC143-CLANGXX_LD_SONAME = -Wl,-dylib_install_name $(firstword $($(1)_SONAME.$(KBUILD_TARGET).$(KBUILD_TYPE)) $($(1)_SONAME.$(KBUILD_TARGET)) $($(1)_SONAME.$(KBUILD_TYPE)) $($(1)_SONAME) $(notdir $(2)))
+#TOOL_VCC143-CLANGXX_DSYMUTIL  ?= $(TOOL_VCC143-CLANGXX_PREFIX)dsymutil$(TOOL_VCC143-CLANGXX_SUFFIX)
+
+TOOL_VCC143-CLANGXX_AR        ?= $(TOOL_VCC143-CLANGXX_PREFIX2)ar$(TOOL_VCC143-CLANGXX_SUFFIX2)
+TOOL_VCC143-CLANGXX_STRIP     ?= $(TOOL_VCC143-CLANGXX_PREFIX2)strip$(TOOL_VCC143-CLANGXX_SUFFIX2)
+TOOL_VCC143-CLANGXX_STRIP_PROGRAM ?= $(TOOL_VCC143-CLANGXX_STRIP) -SXxru
+TOOL_VCC143-CLANGXX_STRIP_DLL     ?= $(TOOL_VCC143-CLANGXX_STRIP) -Sxru
+TOOL_VCC143-CLANGXX_STRIP_SYSMOD  ?= $(TOOL_VCC143-CLANGXX_STRIP) -Sru
+
+# General Properties used by kBuild
+TOOL_VCC143-CLANGXX_COBJSUFF               ?= .o
+TOOL_VCC143-CLANGXX_COBJSUFF.win           ?= .obj
+TOOL_VCC143-CLANGXX_CFLAGS                 ?=
+TOOL_VCC143-CLANGXX_CFLAGS.debug           ?= -g
+TOOL_VCC143-CLANGXX_CFLAGS.profile         ?= -O2 #-g -pg
+TOOL_VCC143-CLANGXX_CFLAGS.release         ?= -O2
+TOOL_VCC143-CLANGXX_CFLAGS.win.x86         ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CFLAGS.win.amd64       ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CFLAGS.win.arm32       ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_CFLAGS.win.arm64       ?= --target=arm64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CINCS                  ?=
+TOOL_VCC143-CLANGXX_CDEFS                  ?=
+
+TOOL_VCC143-CLANGXX_CXXOBJSUFF             ?= .o
+TOOL_VCC143-CLANGXX_CXXOBJSUFF.win         ?= .obj
+TOOL_VCC143-CLANGXX_CXXFLAGS               ?=
+TOOL_VCC143-CLANGXX_CXXFLAGS.debug         ?= -g
+TOOL_VCC143-CLANGXX_CXXFLAGS.profile       ?= -O2 #-g -pg
+TOOL_VCC143-CLANGXX_CXXFLAGS.release       ?= -O2
+TOOL_VCC143-CLANGXX_CXXFLAGS.win.x86       ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CXXFLAGS.win.amd64     ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CXXFLAGS.win.arm32     ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_CXXFLAGS.win.arm64     ?= --target=arm64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_CXXINCS                ?=
+TOOL_VCC143-CLANGXX_CXXDEFS                ?=
+
+TOOL_VCC143-CLANGXX_PCHOBJSUFF             ?= .h.gch
+TOOL_VCC143-CLANGXX_PCHFLAGS               ?= $(TOOL_VCC143-CLANGXX_CXXFLAGS)
+TOOL_VCC143-CLANGXX_PCHFLAGS.debug         ?= $(TOOL_VCC143-CLANGXX_CXXFLAGS.debug)
+TOOL_VCC143-CLANGXX_PCHFLAGS.profile       ?= $(TOOL_VCC143-CLANGXX_CXXFLAGS.profile)
+TOOL_VCC143-CLANGXX_PCHFLAGS.release       ?= $(TOOL_VCC143-CLANGXX_CXXFLAGS.release)
+TOOL_VCC143-CLANGXX_PCHFLAGS.win.x86       ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_PCHFLAGS.win.amd64     ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_PCHFLAGS.win.arm32     ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_PCHFLAGS.win.arm64     ?= --target=arm64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_PCHINCS           	    ?= $(TOOL_VCC143-CLANGXX_CXXINCS)
+TOOL_VCC143-CLANGXX_PCHDEFS                ?= $(TOOL_VCC143-CLANGXX_CXXDEFS)
+
+TOOL_VCC143-CLANGXX_OBJCOBJSUFF            ?= .o
+TOOL_VCC143-CLANGXX_OBJCOBJSUFF.win        ?= .obj
+TOOL_VCC143-CLANGXX_OBJCFLAGS              ?=
+TOOL_VCC143-CLANGXX_OBJCFLAGS.debug        ?= -g
+TOOL_VCC143-CLANGXX_OBJCFLAGS.profile      ?= -O2 #-g -pg
+TOOL_VCC143-CLANGXX_OBJCFLAGS.release      ?= -O2
+TOOL_VCC143-CLANGXX_OBJCFLAGS.win.x86      ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCFLAGS.win.amd64    ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCFLAGS.win.arm32    ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_OBJCFLAGS.win.arm64    ?= --target=arm64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCINCS               ?=
+TOOL_VCC143-CLANGXX_OBJCDEFS               ?=
+
+TOOL_VCC143-CLANGXX_OBJCXXOBJSUFF          ?= .o
+TOOL_VCC143-CLANGXX_OBJCXXOBJSUFF.win      ?= .obj
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS            ?=
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.debug      ?= -g
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.profile    ?= -O2 #-g -pg
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.release    ?= -O2
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.win.x86    ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.win.amd64  ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.win.arm32  ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_OBJCXXFLAGS.win.arm64  ?= --target=arm64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_OBJCXXINCS             ?=
+TOOL_VCC143-CLANGXX_OBJCXXDEFS             ?=
+
+TOOL_VCC143-CLANGXX_ASOBJSUFF              ?= .o
+TOOL_VCC143-CLANGXX_ASOBJSUFF.win          ?= .obj
+TOOL_VCC143-CLANGXX_ASFLAGS                ?= -x assembler-with-cpp
+TOOL_VCC143-CLANGXX_ASFLAGS.debug          ?= -g
+TOOL_VCC143-CLANGXX_ASFLAGS.profile        ?= -g
+TOOL_VCC143-CLANGXX_ASFLAGS.win.x86        ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_ASFLAGS.win.amd64      ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_ASFLAGS.win.arm32      ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_ASFLAGS.win.arm64      ?= --target=arm64-pc-windows-msvc
+
+TOOL_VCC143-CLANGXX_ARFLAGS                ?= -c -rs
+TOOL_VCC143-CLANGXX_ARLIBSUFF              ?= .a
+TOOL_VCC143-CLANGXX_ARLIBSUFF.win          ?= .lib
+
+TOOL_VCC143-CLANGXX_LDFLAGS                ?=
+TOOL_VCC143-CLANGXX_LDFLAGS.debug          ?= -g
+TOOL_VCC143-CLANGXX_LDFLAGS.profile        ?= -g
+TOOL_VCC143-CLANGXX_LDFLAGS.win.x86        ?= --target=x86-pc-windows-msvc
+TOOL_VCC143-CLANGXX_LDFLAGS.win.amd64      ?= --target=x86_64-pc-windows-msvc
+TOOL_VCC143-CLANGXX_LDFLAGS.win.arm32      ?= --target=arm-pc-windows-msvce:
+TOOL_VCC143-CLANGXX_LDFLAGS.win.arm64      ?= --target=arm64-pc-windows-msvc
+
+
+
+
+## Compile C source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+#
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_VCC143-CLANGXX_COMPILE_C_DEPEND =
+TOOL_VCC143-CLANGXX_COMPILE_C_DEPORD =
+TOOL_VCC143-CLANGXX_COMPILE_C_OUTPUT_MAYBE   = $(dep).unix.slash
+TOOL_VCC143-CLANGXX_COMPILE_C_OUTPUT         = $(if-expr "$(use_objcache)" != "",$(outbase).i,)
+TOOL_VCC143-CLANGXX_COMPILE_C_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
+define TOOL_VCC143-CLANGXX_COMPILE_C_CMDS
+if "$(use_objcache)" != ""
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).i\
+		$(TOOL_VCC143-CLANGXX_CC) -E -o -\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_VCC143-CLANGXX_CC) -c\
+		$(flags) -fpreprocessed -x c\
+		-o $(obj)\
+		-
+else
+	$(QUIET)$(TOOL_VCC143-CLANGXX_CC) -c\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+endif
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+
+
+## Compile C++ source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_VCC143-CLANGXX_COMPILE_CXX_DEPEND         = $($(target)_1_GCC_PCH_FILE)
+TOOL_VCC143-CLANGXX_COMPILE_CXX_DEPORD         =
+TOOL_VCC143-CLANGXX_COMPILE_CXX_OUTPUT_MAYBE   = $(dep).unix.slash
+TOOL_VCC143-CLANGXX_COMPILE_CXX_OUTPUT         = $(if-expr "$(use_objcache)" != "",$(outbase).ii,)
+TOOL_VCC143-CLANGXX_COMPILE_CXX_USES_KOBJCACHE = $(if-expr "$(use_objcache)" != "",1,)
+define TOOL_VCC143-CLANGXX_COMPILE_CXX_CMDS
+if "$(use_objcache)" != ""
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).ii\
+		$(TOOL_VCC143-CLANGXX_CXX) -E -o - $(if-expr defined($(target)_PCH_HDR)\
+		,-fpch-preprocess -Winvalid-pch -I$($(target)_1_GCC_PCH_DIR) -include $(basename $($(target)_1_GCC_PCH_FILE)),)\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_VCC143-CLANGXX_CXX) -c\
+		$(flags) -fpreprocessed $(if-expr defined($(target)_PCH_HDR),-fpch-preprocess,) -x c++\
+		-o $(obj)\
+		-
+else
+	$(QUIET)$(TOOL_VCC143-CLANGXX_CXX) -c\
+		$(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj) $(if-expr defined($(target)_PCH_HDR) \
+		,-Winvalid-pch -include $(basename $($(target)_1_GCC_PCH_FILE)),) \
+		$(abspath $(source))
+endif
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+
+
+## Precompile C++ header.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_VCC143-CLANGXX_COMPILE_PCH_DEPEND       =
+TOOL_VCC143-CLANGXX_COMPILE_PCH_DEPORD       = $($(target)_1_GCC_PCH_DIR)
+TOOL_VCC143-CLANGXX_COMPILE_PCH_OUTPUT       = $($(target)_1_GCC_PCH_FILE)
+TOOL_VCC143-CLANGXX_COMPILE_PCH_OUTPUT_MAYBE = $(dep).unix.slash
+define TOOL_VCC143-CLANGXX_COMPILE_PCH_CMDS
+	$(QUIET)$(TOOL_VCC143-CLANGXX_PCH) -c\
+		$(flags) $(qaddprefix sh,-I, $($(target)_1_GCC_PCH_DIR) $(incs)) $(addprefix -D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(INSTALL) --hard-link-files-when-possible -m 0644 -- "$(obj)" "$($(target)_1_GCC_PCH_FILE)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+
+
+## Compile Objective-C source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_DEPEND =
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_DEPORD =
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_OUTPUT_MAYBE   = $(dep).unix.slash
+ifdef KBUILD_USE_KOBJCACHE
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_USES_KOBJCACHE = 1
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_OUTPUT = $(outbase).mi
+define TOOL_VCC143-CLANGXX_COMPILE_OBJC_CMDS
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).ii\
+		$(TOOL_VCC143-CLANGXX_OBJC) -E -o -\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_VCC143-CLANGXX_OBJC) -c\
+		$(flags) -fpreprocessed -x objective-c \
+		-o $(obj)\
+		-
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+else  # !KBUILD_USE_KOBJCACHE
+TOOL_VCC143-CLANGXX_COMPILE_OBJC_OUTPUT =
+define TOOL_VCC143-CLANGXX_COMPILE_OBJC_CMDS
+	$(QUIET)$(TOOL_VCC143-CLANGXX_OBJC) -c\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+endif # !KBUILD_USE_KOBJCACHE
+
+
+## Compile Objective-C++ source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)	    Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)		Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_DEPEND =
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_DEPORD =
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_OUTPUT_MAYBE = $(dep).unix.slash
+ifdef KBUILD_USE_KOBJCACHE
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_USES_KOBJCACHE = 1
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_OUTPUT = $(outbase).mii
+define TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -p\
+		--kObjCache-cpp $(outbase).mii\
+		$(TOOL_VCC143-CLANGXX_OBJCXX) -E -o -\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		$(abspath $(source))\
+		--kObjCache-cc $(obj)\
+		$(TOOL_VCC143-CLANGXX_OBJCXX) -c\
+		$(flags) -fpreprocessed -x objective-c++ \
+		-o $(obj)\
+		-
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+else  # !KBUILD_USE_KOBJCACHE
+TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_OUTPUT =
+define TOOL_VCC143-CLANGXX_COMPILE_OBJCXX_CMDS
+	$(QUIET)$(TOOL_VCC143-CLANGXX_OBJCXX) -c\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+endif # !KBUILD_USE_KOBJCACHE
+
+
+## Compile Assembly source.
+# @param    $(target)   Normalized main target name.
+# @param    $(source)   Source filename (relative).
+# @param    $(obj)      Object file name. This shall be (re)created by the compilation.
+# @param    $(dep)      Dependcy file. This shall be (re)created by the compilation.
+# @param    $(flags)    Flags.
+# @param    $(defs)     Definitions. No -D or something.
+# @param    $(incs)     Includes. No -I or something.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+# @param    $(objsuff)  Object suffix.
+#
+TOOL_VCC143-CLANGXX_COMPILE_AS_DEPEND       =
+TOOL_VCC143-CLANGXX_COMPILE_AS_DEPORD       =
+TOOL_VCC143-CLANGXX_COMPILE_AS_OUTPUT       =
+TOOL_VCC143-CLANGXX_COMPILE_AS_OUTPUT_MAYBE = $(dep).unix.slash
+define TOOL_VCC143-CLANGXX_COMPILE_AS_CMDS
+	$(QUIET)$(TOOL_VCC143-CLANGXX_AS) -c\
+		$(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
+		-Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
+		-o $(obj)\
+		$(abspath $(source))
+	$(QUIET)$(SED) --output "$(dep).unix.slash"  -e 's,\\\([^ :]\),/\1,g' "$(dep)"
+	$(QUIET)$(MV) -f -- "$(dep).unix.slash" "$(dep)"
+	$(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
+endef
+
+
+## Link library
+# @param    $(target)   Normalized main target name.
+# @param    $(out)      Library name.
+# @param    $(objs)     Object files to put in the library.
+# @param    $(flags)    Flags.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(othersrc) Unhandled sources.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+TOOL_VCC143-CLANGXX_LINK_LIBRARY_OUTPUT =
+TOOL_VCC143-CLANGXX_LINK_LIBRARY_DEPEND = $(othersrc)
+TOOL_VCC143-CLANGXX_LINK_LIBRARY_DEPORD =
+define TOOL_VCC143-CLANGXX_LINK_LIBRARY_CMDS
+	$(if $(strip $(filter-out %.h.gch,$(objs))),$(call xargs,$(QUIET)$(TOOL_VCC143-CLANGXX_AR) $(flags) $(out),$(filter-out %.h.gch,$(objs))))
+	$(foreach lib,$(othersrc)\
+		,$(NL)$(TAB)$(call MSG_AR_MERGE,$(target),$(out),$(lib)) \
+		$(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))ar.tmp.dir/* \
+		$(NL)$(TAB)$(QUIET)$(MKDIR) -p $(dir $(outbase))/ar.tmp.dir/ \
+		$(NL)$(TAB)$(QUIET)(cd $(dir $(outbase))ar.tmp.dir/ \
+			&& $(TOOL_VCC143-CLANGXX_AR) -x $(abspath $(lib)) \
+		    && $(RM_EXT) -f ./__.SYMDEF* \
+			&& $(TOOL_VCC143-CLANGXX_AR) $(flags) $(out) *) \
+		$(NL)$(TAB)$(QUIET)$(RM_EXT) -f $(dir $(outbase))/ar.tmp.dir/* \
+		$(NL)$(TAB)$(QUIET)$(RMDIR) $(dir $(outbase))ar.tmp.dir/)
+endef
+
+
+## Link program
+# @param    $(target)   Normalized main target name.
+# @param    $(out)      Program name.
+# @param    $(objs)     Object files to link together.
+# @param    $(libs)     Libraries to search.
+# @param    $(libpath)  Library search paths.
+# @param    $(flags)    Flags.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(othersrc) Unhandled sources.
+# @param    $(custom_pre)   Custom step invoked before linking.
+# @param    $(custom_post)  Custom step invoked after linking.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+TOOL_VCC143-CLANGXX_LINK_PROGRAM_OUTPUT_MAYBE_PRECIOUS = $(outbase).rsp
+TOOL_VCC143-CLANGXX_LINK_PROGRAM_OUTPUT_DEBUG = $(call TOOL_VCC143-CLANGXX_DEBUG_BUNDLE_FN,$(out))
+TOOL_VCC143-CLANGXX_LINK_PROGRAM_DEBUG_INSTALL_FN = $(TOOL_VCC143-CLANGXX_DEBUG_INSTALL_FN)
+TOOL_VCC143-CLANGXX_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
+TOOL_VCC143-CLANGXX_LINK_PROGRAM_DEPORD =
+define TOOL_VCC143-CLANGXX_LINK_PROGRAM_CMDS
+	$(QUIET)$(APPEND) -tn $(outbase).rsp $(filter-out %.h.gch,$(objs))
+	$(QUIET)$(TOOL_VCC143-CLANGXX_LD) $(flags) -o $(out)\
+		-filelist $(outbase).rsp\
+		$(foreach p,$(libpath), -L$(p))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+# ifeq ($(ld_debug),split)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_DSYMUTIL) -o $(out).dSYM/ $(out)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_STRIP_PROGRAM) $(out)
+# endif
+endef
+
+
+## Link DLL
+# @param    $(target)   Normalized main target name.
+# @param    $(out)      Program name.
+# @param    $(objs)     Object files to link together.
+# @param    $(libs)     Libraries to search.
+# @param    $(libpath)  Library search paths.
+# @param    $(flags)    Flags.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(othersrc) Unhandled sources.
+# @param    $(custom_pre)   Custom step invoked before linking.
+# @param    $(custom_post)  Custom step invoked after linking.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+TOOL_VCC143-CLANGXX_LINK_DLL_OUTPUT_MAYBE_PRECIOUS = $(outbase).rsp
+TOOL_VCC143-CLANGXX_LINK_DLL_OUTPUT_DEBUG = $(call TOOL_VCC143-CLANGXX_DEBUG_BUNDLE_FN,$(out))
+TOOL_VCC143-CLANGXX_LINK_DLL_DEBUG_INSTALL_FN = $(TOOL_VCC143-CLANGXX_DEBUG_INSTALL_FN)
+TOOL_VCC143-CLANGXX_LINK_DLL_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
+TOOL_VCC143-CLANGXX_LINK_DLL_DEPORD =
+define TOOL_VCC143-CLANGXX_LINK_DLL_CMDS
+	$(QUIET)$(APPEND) -tn $(outbase).rsp $(filter-out %.h.gch,$(objs))
+	$(QUIET)$(TOOL_VCC143-CLANGXX_LD) $(TOOL_VCC143-CLANGXX_LDFLAGS.dll) $(flags) -o $(out)\
+		$(call TOOL_VCC143-CLANGXX_LD_SONAME,$(target),$(out))\
+		-filelist $(outbase).rsp\
+		$(foreach p,$(libpath), -L$(p))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+# ifeq ($(ld_debug),split)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_DSYMUTIL) -o $(out).dSYM/ $(out)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_STRIP_DLL) $(out)
+# endif
+endef
+
+
+## Link system module (windows aka driver, linux aka kernel module)
+# @param    $(target)   Normalized main target name.
+# @param    $(out)      System module name.
+# @param    $(objs)     Object files to link together.
+# @param    $(libs)     Libraries to search.
+# @param    $(libpath)  Library search paths.
+# @param    $(flags)    Flags.
+# @param    $(dirdep)   Directory creation dependency.
+# @param    $(deps)     Other dependencies.
+# @param    $(othersrc) Unhandled sources.
+# @param    $(custom_pre)   Custom step invoked before linking.
+# @param    $(custom_post)  Custom step invoked after linking.
+# @param    $(outbase)  Output basename (full). Use this for list files and such.
+TOOL_VCC143-CLANGXX_LINK_SYSMOD_OUTPUT_MAYBE_PRECIOUS = $(outbase).rsp
+TOOL_VCC143-CLANGXX_LINK_SYSMOD_OUTPUT_DEBUG = $(call TOOL_VCC143-CLANGXX_DEBUG_BUNDLE_FN,$(out))
+TOOL_VCC143-CLANGXX_LINK_SYSMOD_DEBUG_INSTALL_FN = $(TOOL_VCC143-CLANGXX_DEBUG_INSTALL_FN)
+TOOL_VCC143-CLANGXX_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))
+TOOL_VCC143-CLANGXX_LINK_SYSMOD_DEPORD =
+define TOOL_VCC143-CLANGXX_LINK_SYSMOD_CMDS
+	$(QUIET)$(APPEND) -tn $(outbase).rsp $(filter-out %.h.gch,$(objs))
+	$(QUIET)$(TOOL_VCC143-CLANGXX_LD_SYSMOD) $(TOOL_VCC143-CLANGXX_LDFLAGS.sysmod) $(flags) -o $(out)\
+		-filelist $(outbase).rsp\
+		$(foreach p,$(libpath), -L$(p))\
+		$(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
+# ifeq ($(ld_debug),split)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_DSYMUTIL) -o $(out).dSYM/ $(out)
+#	$(QUIET)$(TOOL_VCC143-CLANGXX_STRIP_SYSMOD) $(out)
+# endif
+endef
+
