Bug 1364428 - Pass bindir instead of libdir to llvm-config on windows; r=froydnj
authorBobby Holley <bobbyholley@mozilla.com>
Thu, 18 May 2017 18:39:39 -0400
changeset 409701 40d03699e48f79ac8826fa9d9e34e2587ee8b3fb
parent 409700 3c779485d546489005c89b49f745ffb436eb45d7
child 409702 ff9f8eb96ef3ab989f1bbf8db395e9a50d69e2f3
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)
reviewersfroydnj
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 - Pass bindir instead of libdir to llvm-config on windows; r=froydnj libdir contains libclang.lib, whereas bindir contains libclang.dll; we want the latter on Windows for bindgen's purposes.
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -672,34 +672,36 @@ def check_minimum_llvm_config_version(ll
         To compile Stylo, please install version {} or greater of
         Clang + LLVM and ensure that the 'llvm-config' from that
         installation is first on your path.
 
         You can verify this by typing 'llvm-config --version'.
         '''.format(version, min_version)))
 
 @depends(stylo_config, '--enable-stylo-build-bindgen',
-         llvm_config, '--with-libclang-path', '--with-clang-path')
+         llvm_config, '--with-libclang-path', '--with-clang-path',
+         host)
 @imports(_from='textwrap', _import='dedent')
 def bindgen_config_paths(stylo_config, bindgen_enabled,
-                         llvm_config, libclang_path, clang_path):
+                         llvm_config, libclang_path, clang_path,
+                         host):
     if not stylo_config.build:
         return None
 
     if not bindgen_enabled:
         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)
         return namespace(
-            libclang_path=invoke_llvm_config(llvm_config, '--libdir'),
+            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'),
         )
 
     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