Bug 1561350 - Fix libclang detection for clang-cl 9 r=glandium
authorDavid Major <dmajor@mozilla.com>
Tue, 25 Jun 2019 20:39:01 +0000
changeset 480081 dcf33acba09527474a11e107f71583916fc86cbe
parent 480080 28854bf543da35394680922280e267eb65eb7a41
child 480082 578f090c90856faf65e33296a1bcd60ba7e69eff
push id36201
push usercsabou@mozilla.com
push dateWed, 26 Jun 2019 03:57:29 +0000
treeherdermozilla-central@a3cad1d7836c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1561350
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1561350 - Fix libclang detection for clang-cl 9 r=glandium In the clang-cl 9 case where we have semicolon-separated paths, the `dirs` variable is never read, so the libclang detection fails. Differential Revision: https://phabricator.services.mozilla.com/D35825
build/moz.configure/bindgen.configure
--- a/build/moz.configure/bindgen.configure
+++ b/build/moz.configure/bindgen.configure
@@ -147,17 +147,17 @@ def bindgen_libclang_path(libclang_path,
         for line in clang_search_dirs.splitlines():
             name, _, value = line.partition(': =')
             if host.os == 'WINNT' and name == 'programs':
                 # On Windows, libclang.dll is in bin/ rather than lib/,
                 # so scan the programs search dirs.
                 # To make matters complicated, clang before version 9 uses `:`
                 # separate between paths (and `;` in newer versions)
                 if pathsep in value:
-                    dirs = value.split(pathsep)
+                    candidates.extend(value.split(pathsep))
                 else:
                     for part in value.split(':'):
                         # Assume that if previous "candidate" was of length 1,
                         # it's a drive letter and the current part is the rest of
                         # the corresponding full path.
                         if candidates and len(candidates[-1]) == 1:
                             candidates[-1] += ':' + part
                         else: