Bug 1318189 - mach configure cannot detect MFC library path on VS2017. r?glandium draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 21 Nov 2016 10:55:50 +0900
changeset 441844 66bf09c1a6f98819722daa0aa328190fed930436
parent 441843 59375acb5ae8b4fdaba7fe649c25826e48536792
child 537636 bac46b2015bf2940f3556a028c5c868df5b8e11b
push id36519
push userm_kato@ga2.so-net.ne.jp
push dateMon, 21 Nov 2016 05:08:31 +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),