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
--- 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),