• Home
  • Raw
  • Download

Lines Matching +full:discard +full:- +full:paths

1 // SPDX-License-Identifier: Apache-2.0
43 /// `llvm-config` couldn't be executed but an instance of `libclang` was found
47 discard: bool, field
51 pub fn discard(mut self) { in discard() method
52 self.discard = true; in discard()
58 if self.discard { in drop()
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()
78 if let Some(errors) = errors.get("xcode-select") { in drop()
80 "cargo:warning=could not execute `xcode-select` one or more \ 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()
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",
185 // system-wide directories.
191 // https://github.com/KyleMayes/clang-sys/issues/121
197 "/opt/ooce/llvm-*/lib",
198 "/opt/ooce/clang-*/lib",
206 /// and returns the paths to and filenames of those files.
207 fn search_directory(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directory()
215 let paths = filenames in search_directory() localVariable
224 paths 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()
236 if filename.contains("-cpp.") { in search_directory()
246 /// match one or more filename glob patterns and returns the paths to and
248 fn search_directories(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directories()
265 /// filename glob patterns and returns the paths to and filenames of those files.
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()