Bug 1512882 - Support building comm-esr52 x86 with VS2017. r=IanN a=IanN CLOSED TREE DONTBUILD SEAMONKEY_2_49_ESR_RELBRANCH
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sat, 12 Jan 2019 21:56:53 +0100
branchSEAMONKEY_2_49_ESR_RELBRANCH
changeset 357545 d47e78bd1354d920e9ee8344fcad16046aa28fc4
parent 357544 d09a499ebaec77cc805be98a8ae3b99f1876e33d
child 357546 fade2a70ad157186a7fdc858c8f7910bc71ef688
push id7834
push userfrgrahl@gmx.net
push dateSun, 13 Jan 2019 12:17:02 +0000
treeherdermozilla-esr52@6e4ad8a8f2e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1512882
milestone52.9.1
Bug 1512882 - Support building comm-esr52 x86 with VS2017. r=IanN a=IanN CLOSED TREE DONTBUILD mozilla-esr52 SEAMONKEY_2_49_ESR_RELBRANCH
security/sandbox/win/wow_helper/Makefile.in
--- a/security/sandbox/win/wow_helper/Makefile.in
+++ b/security/sandbox/win/wow_helper/Makefile.in
@@ -16,26 +16,32 @@ lazy = $(if $(___$(1)),,$(eval ___$(1) :
 # to do the conversion for us by calling python with an environment variable
 # with the result of the call to `which`. Then munge that path to add the
 # x64 cross-compiler path.
 ifdef MOZ_USING_COMPILER_WRAPPER
 ORIG_CXX := cl
 else
 ORIG_CXX := $(CXX)
 endif
+
+# The path layout changed in VS2017.
+ifeq ($(_MSC_VER),1900)
 CXX = $(call lazy,CXX,"$$(subst amd64_x86/x86_amd64/,amd64/,$$(shell CL=`which "$(ORIG_CXX)"` $(PYTHON) -c 'import os; print os.path.dirname(os.environ["CL"])')/x86_amd64/cl.exe)")
+else
+CXX = $(call lazy,CXX,"$$(subst HostX64/x86/,HostX64/x64/,$$(shell CL=`which "$(ORIG_CXX)"` $(PYTHON) -c 'import os; print os.path.dirname(os.environ["CL"])')/cl.exe)")
+endif
 
 MOZ_WINCONSOLE = 0
 
 include $(topsrcdir)/config/config.mk
 
 # Munge the LIB variable to contain paths to the x64 CRT and system libraries.
 # Unconveniently, none of the paths have the same convention, including the
 # compiler path above.
-LIB = $(call lazy,LIB,$$(shell python -c 'import os; print ";".join(s.lower().replace(os.sep, "/").replace("/vc/lib", "/vc/lib/amd64").replace("/um/x86", "/um/x64").replace("/ucrt/x86", "/ucrt/x64") for s in os.environ["LIB"].split(";"))'))
+LIB = $(call lazy,LIB,$$(shell python -c 'import os; print ";".join(s.lower().replace(os.sep, "/").replace("/vc/lib", "/vc/lib/amd64").replace("/um/x86", "/um/x64").replace("/ucrt/x86", "/ucrt/x64").replace("/lib/x86", "/lib/x64") for s in os.environ["LIB"].split(";"))'))
 
 CXXFLAGS := $(filter-out -arch:%,$(CXXFLAGS))
 
 # OS_COMPILE_CXXFLAGS includes mozilla-config.h, which contains x86-specific
 # defines breaking the build.
 OS_COMPILE_CXXFLAGS :=
 
 # LNK1246: '/SAFESEH' not compatible with 'x64' target machine