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.
This commit is contained in:
Nathan Froyd 2017-05-18 18:39:39 -04:00
Родитель 5751b4990d
Коммит 64a0bd97c8
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -695,10 +695,12 @@ def bindgen_config_paths(stylo_config, bindgen_enabled,
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 \