Bug 1318189 - mach configure cannot detect MFC library path on VS2017. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 21 Nov 2016 10:55:50 +0900
changeset 324148 53a9ff4a083a2c790d25939a598ec8378e77abf4
parent 324147 5e87f33d7a227bbc74f04ed82c36e67ef734aa03
child 324149 3ba00502fa16601c4daafe041bb65e318e0b4be2
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersglandium
bugs1318189, 24629
milestone53.0a1
Bug 1318189 - mach configure cannot detect MFC library path on VS2017. r=glandium VS2017's directory structure for mfc is the following. Directory of C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\vc\Tools\msvc\14.10.24629\atlmfc\lib 2016/11/21 13:57 <DIR> . 2016/11/21 13:57 <DIR> .. 2016/11/21 13:57 <DIR> arm 2016/11/21 14:00 <DIR> x64 2016/11/21 13:59 <DIR> x86 So this structure is changed, we cannot detect mfc when using VS2017. MozReview-Commit-ID: 2ft4stYPZbe
build/moz.configure/windows.configure
--- a/build/moz.configure/windows.configure
+++ b/build/moz.configure/windows.configure
@@ -330,18 +330,21 @@ def lib_path(target, vc_path, windows_sd
     sdk_target = {
         'x86': 'x86',
         'x86_64': 'x64',
         'arm': 'arm',
     }.get(target.cpu)
 
     atlmfc_dir = os.path.join(vc_path, 'atlmfc', 'lib', *vc_target)
     if not os.path.isdir(atlmfc_dir):
-        die('Cannot find the ATL/MFC libraries in the Visual C++ directory (%s). '
-            'Please install them.' % vc_path)
+        # For Visual Studio 2017
+        atlmfc_dir = os.path.join(vc_path, 'atlmfc', 'lib', sdk_target)
+        if not os.path.isdir(atlmfc_dir):
+            die('Cannot find the ATL/MFC libraries in the Visual C++ directory '
+                '(%s). Please install them.' % vc_path)
 
 
     libs = []
     lib_env = os.environ.get('LIB')
     if lib_env:
         libs.append(lib_env)
     libs.extend((
         os.path.join(vc_path, 'lib', *vc_target),