diff options
Diffstat (limited to 'kBuild/tools/VCC100AMD64.kmk')
-rw-r--r-- | kBuild/tools/VCC100AMD64.kmk | 88 |
1 files changed, 52 insertions, 36 deletions
diff --git a/kBuild/tools/VCC100AMD64.kmk b/kBuild/tools/VCC100AMD64.kmk index 43e7ecd..0a06a4d 100644 --- a/kBuild/tools/VCC100AMD64.kmk +++ b/kBuild/tools/VCC100AMD64.kmk @@ -1,4 +1,4 @@ -# $Id: VCC100AMD64.kmk 2557 2011-12-13 12:48:32Z bird $ +# $Id: VCC100AMD64.kmk 2625 2012-08-07 20:26:48Z bird $ ## @file # kBuild Tool Config - Visual C++ 10.0 (aka Visual 2010 and MSC v16), targeting AMD64. # @@ -68,10 +68,22 @@ PATH_TOOL_VCC100AMD64_ATLMFC_LIB ?= $(PATH_TOOL_VCC100AMD64_ATLMFC)/lib/amd64 TOOL_VCC100AMD64_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/cl.exe TOOL_VCC100AMD64_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/cl.exe TOOL_VCC100AMD64_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/ml64.exe -TOOL_VCC100AMD64_RC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/../rc.exe TOOL_VCC100AMD64_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/lib.exe TOOL_VCC100AMD64_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/link.exe -TOOL_VCC100AMD64_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/../mt.exe +TOOL_VCC100AMD64_DUMPBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/dumpbin.exe +TOOL_VCC100AMD64_EDITBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/editbin.exe +TOOL_VCC100AMD64_RC ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,rc.exe,[Rr][Cc].[Ee][Xx][Ee],TOOL_VCC100_RC_CACHED) +TOOL_VCC100AMD64_MT ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,mt.exe,[Mm][Tt].[Ee][Xx][Ee],TOOL_VCC100_MT_CACHED) + +# The following in duplicated in VCC100.kmk and VCC100X86.kmk. +TOOL_VCC100_FN_FIND_SDK_TOOL_SUB = $(eval $3 := $(firstword \ + $(if-expr defined(PATH_SDK_WINPSDK71_BIN), $(wildcard $(PATH_SDK_WINPSDK71_BIN)/$2)) \ + $(if-expr defined(PATH_SDK_WINPSDK_BIN) , $(wildcard $(PATH_SDK_WINPSDK_BIN)/$2)) \ + $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/sdk/*/[Bb][Ii][Nn]/$2)) \ + $(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/sdk/*/[Bb][Ii][Nn]/$2)) \ + $1)) +TOOL_VCC100_FN_FIND_SDK_TOOL = $(if-expr !defined($3),$(TOOL_VCC100_FN_FIND_SDK_TOOL_SUB),)$($3) + ## Disabled fast DEP_IDB based dependencies. #VCC100AMD64_OLD_DEPS = 1 @@ -81,16 +93,18 @@ TOOL_VCC100AMD64_MT ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100AMD64_BIN)/../mt.exe TOOL_VCC100AMD64_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2) TOOL_VCC100AMD64_COBJSUFF ?= .obj -TOOL_VCC100AMD64_CFLAGS ?= -TC -c -nologo -TOOL_VCC100AMD64_CFLAGS.debug ?= -Od -Zi +TOOL_VCC100AMD64_CFLAGS ?= -TC -nologo +TOOL_VCC100AMD64_CFLAGS.debug ?= -Zi +TOOL_VCC100AMD64_CFLAGS.dbgopt ?= -O2 -Zi TOOL_VCC100AMD64_CFLAGS.release ?= -O2 TOOL_VCC100AMD64_CFLAGS.profile ?= -O2 TOOL_VCC100AMD64_CINCS ?= $(PATH_TOOL_VCC100AMD64_INC) TOOL_VCC100AMD64_CDEFS ?= TOOL_VCC100AMD64_CXXOBJSUFF ?= .obj -TOOL_VCC100AMD64_CXXFLAGS ?= -TP -c -nologo -TOOL_VCC100AMD64_CXXFLAGS.debug ?= -Od -Zi +TOOL_VCC100AMD64_CXXFLAGS ?= -TP -nologo +TOOL_VCC100AMD64_CXXFLAGS.debug ?= -Zi +TOOL_VCC100AMD64_CXXFLAGS.dbgopt ?= -O2 -Zi TOOL_VCC100AMD64_CXXFLAGS.release ?= -O2 TOOL_VCC100AMD64_CXXFLAGS.profile ?= -O2 TOOL_VCC100AMD64_CXXINCS ?= $(PATH_TOOL_VCC100AMD64_INC) $(PATH_TOOL_VCC100AMD64_ATLMFC_INC) @@ -106,6 +120,8 @@ TOOL_VCC100AMD64_ARLIBSUFF ?= .lib TOOL_VCC100AMD64_LDFLAGS ?= -nologo -machine:amd64 TOOL_VCC100AMD64_LDFLAGS.debug ?= -debug +TOOL_VCC100AMD64_LDFLAGS.dbgopt ?= -debug +TOOL_VCC100AMD64_LDFLAGS.profile ?= -debug TOOL_VCC100AMD64_LDFLAGS.release ?= @@ -125,6 +141,25 @@ TOOL_VCC100AMD64_LDFLAGS.release ?= # @param $(objsuff) Object suffix. TOOL_VCC100AMD64_COMPILE_C_DEPEND = TOOL_VCC100AMD64_COMPILE_C_DEPORD = +ifdef KBUILD_USE_KOBJCACHE +TOOL_VCC100AMD64_COMPILE_C_USES_KOBJCACHE = 1 +TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(outbase).i +TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE = +define TOOL_VCC100AMD64_COMPILE_C_CMDS + $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\ + --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\ + --kObjCache-cpp $(outbase).i\ + $(TOOL_VCC100AMD64_CC) -E\ + $(subst -Zi,-Z7,$(flags))\ + $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ + $(subst /,\\,$(abspath $(source))) \ + --kObjCache-cc $(obj)\ + $(TOOL_VCC100AMD64_CC) -c\ + $(subst -Zi,-Z7,$(flags))\ + -Fo$(obj)\ + $(outbase).i +endef +else # !KBUILD_USE_KOBJCACHE TOOL_VCC100AMD64_COMPILE_C_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb) TOOL_VCC100AMD64_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb) define TOOL_VCC100AMD64_COMPILE_C_CMDS @@ -136,6 +171,7 @@ define TOOL_VCC100AMD64_COMPILE_C_CMDS $(subst /,\\,$(abspath $(source))) $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb) endef +endif # !KBUILD_USE_KOBJCACHE ## Compile C++ source. @@ -155,44 +191,22 @@ TOOL_VCC100AMD64_COMPILE_CXX_DEPEND = TOOL_VCC100AMD64_COMPILE_CXX_DEPORD = ifdef KBUILD_USE_KOBJCACHE TOOL_VCC100AMD64_COMPILE_CXX_USES_KOBJCACHE = 1 -TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb) $(outbase).ii -TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb) -if 1 +TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(outbase).ii +TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE = define TOOL_VCC100AMD64_COMPILE_CXX_CMDS - $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -r\ - --named-pipe-compile $(subst /,\\,//./pipe/kObjCache/$(translate $(outbase),:,_)/$(notdir $(source)))\ + $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\ + --make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\ --kObjCache-cpp $(outbase).ii\ $(TOOL_VCC100AMD64_CXX) -E\ - $(flags)\ + $(subst -Zi,-Z7,$(flags))\ $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ $(subst /,\\,$(abspath $(source))) \ --kObjCache-cc $(obj)\ - windbg $(TOOL_VCC100AMD64_CXX) -c -TP\ - $(flags)\ - -Fd$(outbase)-obj.pdb \ - -FD\ - -Fo$(obj)\ - $(subst /,\\,//./pipe/kObjCache/$(translate $(outbase),:,_)/$(notdir $(source))) - $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb) -endef -else -define TOOL_VCC100AMD64_COMPILE_CXX_CMDS - $(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -r\ - --kObjCache-cpp $(outbase).ii\ - $(TOOL_VCC100AMD64_CXX) -E\ - $(flags)\ - $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\ - $(subst /,\\,$(abspath $(source))) \ - --kObjCache-cc $(obj)\ - $(TOOL_VCC100AMD64_CXX) -c -TP\ - $(flags)\ - -Fd$(outbase)-obj.pdb \ - -FD\ + $(TOOL_VCC100AMD64_CXX) -c\ + $(subst -Zi,-Z7,$(flags))\ -Fo$(obj)\ $(outbase).ii - $(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100AMD64_PDB,$(outbase)-obj,idb) endef -endif else # !KBUILD_USE_KOBJCACHE TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,idb) TOOL_VCC100AMD64_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC100AMD64_PDB, $(outbase)-obj,pdb) @@ -207,6 +221,8 @@ define TOOL_VCC100AMD64_COMPILE_CXX_CMDS endef endif # !KBUILD_USE_KOBJCACHE +## @todo configure the assembler template. + ## Compile resource source. # @param $(target) Normalized main target name. # @param $(source) Source filename (relative). |