Bug 1364428 - use normsep for windows bindgen paths; r=rillian
authorNathan Froyd <froydnj@mozilla.com>
Thu, 18 May 2017 18:39:39 -0400
changeset 409702 ff9f8eb96ef3ab989f1bbf8db395e9a50d69e2f3
parent 409701 40d03699e48f79ac8826fa9d9e34e2587ee8b3fb
child 409703 a11eda203014db75970ca68af3ccdcf40e4057bc
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1364428
milestone55.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 1364428 - use normsep for windows bindgen paths; r=rillian bindgen, for whatever reason, is much happier with C:/path/to/file than "normal" Windows paths. If we provide normal Windows paths, clang-sys will complain that it's unable to find libclang.dll/clang.dll, even though we've clearly given it the correct paths by passing in an appropriate value for LIBCLANG_PATH.
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -690,20 +690,22 @@ def bindgen_config_paths(stylo_config, b
         return None
 
     if not libclang_path and not clang_path:
         # We must have LLVM_CONFIG in this case.
         if not llvm_config:
             return None
 
         check_minimum_llvm_config_version(llvm_config)
+        libclang_arg = '--bindir' if host.os == 'WINNT' else '--libdir'
+        clang_path = os.path.join(invoke_llvm_config(llvm_config, '--bindir'),
+                                  'clang')
         return namespace(
-            libclang_path=invoke_llvm_config(llvm_config, '--bindir' if host.os == 'WINNT' else '--libdir'),
-            clang_path=os.path.join(invoke_llvm_config(llvm_config, '--bindir'),
-                                    'clang'),
+            libclang_path=normsep(invoke_llvm_config(llvm_config, libclang_arg)),
+            clang_path=normsep(clang_path),
         )
 
     if (not libclang_path and clang_path) or \
        (libclang_path and not clang_path):
         die(dedent('''\
         You must provide both of --with-libclang-path and --with-clang-path
         or neither of them.'''))