Changeset 3331 for trunk/kBuild/tools


Ignore:
Timestamp:
Apr 20, 2020, 12:40:21 AM (5 years ago)
Author:
bird
Message:

tools/VCC141AMD64.kmk: Add host DLL bin dir to the PATH if the host isn't AMD64.

File:
1 edited

Legend:

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

    r3329 r3331  
    5454endif
    5555PATH_TOOL_VCC141AMD64_BIN_QSH := $(requote sh,$(PATH_TOOL_VCC141AMD64_BIN))
     56
     57# A bunch of DLLs are only in the subdir matching the host one, so we need to add it to the PATH when cross compiling.
     58ifndef PATH_TOOL_VCC141AMD64_DLL_BIN
     59 ifneq ($(PATH_TOOL_VCC141_HOST_DLL_BIN),$(PATH_TOOL_VCC141AMD64_BIN))
     60PATH_TOOL_VCC141AMD64_DLL_BIN := $(PATH_TOOL_VCC141_HOST_DLL_BIN)
     61 endif
     62endif
    5663
    5764ifndef PATH_TOOL_VCC141AMD64_LIB
     
    9097  ifneq ($(substr $(qdir un,$(PATH_TOOL_VCC141AMD64_BIN)),-3),64/)
    9198   TOOL_VCC141AMD64_KSUBMIT ?= kmk_builtin_kSubmit --64-bit
    92    TOOL_VCC141AMD64_KSUBMIT_DD = $(TOOL_VCC141AMD64_KSUBMIT) --
    9399  else
    94100   TOOL_VCC141AMD64_KSUBMIT ?= kmk_builtin_kSubmit --32-bit
    95    TOOL_VCC141AMD64_KSUBMIT_DD = $(TOOL_VCC141AMD64_KSUBMIT) --
    96101  endif
     102  ifdef PATH_TOOL_VCC141AMD64_DLL_BIN
     103   TOOL_VCC141AMD64_KSUBMIT := $(TOOL_VCC141AMD64_KSUBMIT) --prepend "PATH=$(requote shell-in-dq,$(PATH_TOOL_VCC141AMD64_DLL_BIN));"
     104  endif
     105  TOOL_VCC141AMD64_KSUBMIT_DD := $(TOOL_VCC141AMD64_KSUBMIT) --
     106 endif
     107endif
     108ifdef PATH_TOOL_VCC141AMD64_DLL_BIN
     109 TOOL_VCC141AMD64_SETUP_ENV   := $(REDIRECT) --prepend "PATH=$(requote shell-in-dq,$(PATH_TOOL_VCC141AMD64_DLL_BIN));" --$(SP)
     110 ifndef TOOL_VCC141AMD64_KSUBMIT_DD
     111  TOOL_VCC141AMD64_KSUBMIT_DD := $(TOOL_VCC141AMD64_SETUP_ENV)
    97112 endif
    98113endif
     
    103118PATH_TOOL_VCC141AMD64_REDIST_DEBUG     ?= $(PATH_TOOL_VCC141_REDIST_DEBUG)/x64
    104119PATH_TOOL_VCC141AMD64_REDIST_DEBUG_CRT  = $(PATH_TOOL_VCC141AMD64_REDIST_DEBUG)/$(TOOL_VCC141_REDIST_CRT_SUBDIR)
    105 
    106120
    107121#
     
    171185else
    172186 define TOOL_VCC141AMD64_COMPILE_C_CMDS
    173         $(QUIET)$(TOOL_VCC141AMD64_CC) -c\
     187        $(QUIET)$(TOOL_VCC141AMD64_SETUP_ENV)$(TOOL_VCC141AMD64_CC) -c\
    174188                $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
    175189                -Fd$(outbase)-obj.pdb \
     
    213227else
    214228 define TOOL_VCC141AMD64_COMPILE_CXX_CMDS
    215         $(QUIET)$(TOOL_VCC141AMD64_CXX) -c\
     229        $(QUIET)$(TOOL_VCC141AMD64_SETUP_ENV)$(TOOL_VCC141AMD64_CXX) -c\
    216230                $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
    217231                $(if-expr defined($(target)_PCH_HDR)\
     
    259273 define TOOL_VCC141AMD64-PCH_COMPILE_CXX_CMDS
    260274        $(QUIET)$(RM) -f -- $($(target)_1_VCC_PCH_FILE) $($(target)_1_VCC_COMMON_OBJ_PDB)
    261         $(QUIET)$(TOOL_VCC141AMD64_CXX) -c -Yc\
     275        $(QUIET)$(TOOL_VCC141AMD64_SETUP_ENV)$(TOOL_VCC141AMD64_CXX) -c -Yc\
    262276                $(flags) $(qaddprefix sh,-I, $(incs)) $(qaddprefix sh,-D, $(defs))\
    263277               -Fp$($(target)_1_VCC_PCH_FILE) \
Note: See TracChangeset for help on using the changeset viewer.