• Home
  • Raw
  • Download

Lines Matching +full:libclang +full:- +full:version

1 // SPDX-License-Identifier: Apache-2.0
42 /// script fails to link to an instance of `libclang`. For example, if
43 /// `llvm-config` couldn't be executed but an instance of `libclang` was found
64 if let Some(errors) = errors.get("llvm-config") { in drop()
66 "cargo:warning=could not execute `llvm-config` one or more \ in drop()
68 a full path to valid `llvm-config` executable it will be used \ in drop()
69 to try to find an instance of `libclang` on your system: {}", in drop()
78 if let Some(errors) = errors.get("xcode-select") { in drop()
80 "cargo:warning=could not execute `xcode-select` one or more \ in drop()
82 it will be used to try to find an instance of `libclang` on \ in drop()
96 Option<Box<dyn Fn(&str, &str, &[&str]) -> Option<String> + Send + Sync + 'static>>,
101 fn run_command(name: &str, path: &str, arguments: &[&str]) -> Option<String> { in run_command()
125 /// Executes the `llvm-config` command and returns the `stdout` output if the
127 pub fn run_llvm_config(arguments: &[&str]) -> Option<String> { in run_llvm_config()
128 let path = env::var("LLVM_CONFIG_PATH").unwrap_or_else(|_| "llvm-config".into()); in run_llvm_config()
129 run_command("llvm-config", &path, arguments) in run_llvm_config()
132 /// Executes the `xcode-select` command and returns the `stdout` output if the
134 pub fn run_xcode_select(arguments: &[&str]) -> Option<String> { in run_xcode_select()
135 run_command("xcode-select", "xcode-select", arguments) in run_xcode_select()
142 // preference, so if multiple `libclang` instances
144 // the `libclang` instances from earlier
145 // directories will be preferred (though version
149 /// `libclang` directory patterns for Haiku.
151 "/boot/home/config/non-packaged/develop/lib",
152 "/boot/home/config/non-packaged/lib",
153 "/boot/system/non-packaged/develop/lib",
154 "/boot/system/non-packaged/lib",
159 /// `libclang` directory patterns for Linux (and FreeBSD).
170 /// `libclang` directory patterns for macOS.
178 /// `libclang` directory patterns for Windows.
185 // system-wide directories.
191 // https://github.com/KyleMayes/clang-sys/issues/121
195 /// `libclang` directory patterns for illumos
197 "/opt/ooce/llvm-*/lib",
198 "/opt/ooce/clang-*/lib",
207 fn search_directory(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directory()
232 // The `libclang_shared` library has been renamed to `libclang-cpp` in search_directory()
234 // `libclang-cpp.so.10`) to be matched by patterns looking for in search_directory()
235 // instances of `libclang`. in search_directory()
236 if filename.contains("-cpp.") { in search_directory()
248 fn search_directories(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directories()
251 // On Windows, `libclang.dll` is usually found in the LLVM `bin` directory in search_directories()
252 // while `libclang.lib` is usually found in the LLVM `lib` directory. To in search_directories()
264 /// Finds the `libclang` static or dynamic libraries matching one or more
266 pub fn search_libclang_directories(filenames: &[String], variable: &str) -> Vec<(PathBuf, String)> { in search_libclang_directories()
286 // `llvm-config --prefix`. in search_libclang_directories()
287 if let Some(output) = run_llvm_config(&["--prefix"]) { in search_libclang_directories()
295 // `xcode-select --print-path`. in search_libclang_directories()
297 if let Some(output) = run_xcode_select(&["--print-path"]) { in search_libclang_directories()
311 // Determine the `libclang` directory patterns. in search_libclang_directories()
342 // Search the directories provided by the `libclang` directory patterns. in search_libclang_directories()