com php-src: add existence check for clang lib dir and improve on x86: win32/build/confutils.js

[email protected] (Anatol Belski)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    6ab2c558f1862194c6dd4b1ed7f8ce63474349ae
Author:    Anatol Belski <[email protected]>         Mon, 3 Apr 2017 15:29:56 +0200
Parents:   f02b4d575ff34a88872457516220ef8acb2b9161
Branches:  master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=6ab2c558f1862194c6dd4b1ed7f8ce63474349ae

Log:
add existence check for clang lib dir and improve on x86

Changed paths:
  M  win32/build/confutils.js


Diff:
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 2c603b3..3724878 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -3388,11 +3388,23 @@ function get_clang_lib_dir()
 		ERROR("Faled to determine clang lib path");
 	}
 
-	/* FIXME existence check, etc. */
 	if (X64) {
 		ret = PROGRAM_FILES + "\\LLVM\\lib\\clang\\" + ver + "\\lib";
+		if (!FSO.FolderExists(ret)) {
+			ret = null;
+		}
 	} else {
 		ret = PROGRAM_FILESx86 + "\\LLVM\\lib\\clang\\" + ver + "\\lib";
+		if (!FSO.FolderExists(ret)) {
+			ret = PROGRAM_FILES + "\\LLVM\\lib\\clang\\" + ver + "\\lib";
+			if (!FSO.FolderExists(ret)) {
+				ret = null;
+			}
+		}
+	}
+
+	if (null == ret) {
+		ERROR("Invalid clang lib path encountered");
 	}
 
 	return ret;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.