Lines Matching +full:llvm +full:- +full:config
1 // SPDX-License-Identifier: Apache-2.0
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()
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 fn run_command(name: &str, path: &str, arguments: &[&str]) -> Option<String> { in run_command()
115 /// Executes the `llvm-config` command and returns the `stdout` output if the
117 pub fn run_llvm_config(arguments: &[&str]) -> Option<String> { in run_llvm_config()
118 let path = env::var("LLVM_CONFIG_PATH").unwrap_or_else(|_| "llvm-config".into()); in run_llvm_config()
119 run_command("llvm-config", &path, arguments) in run_llvm_config()
122 /// Executes the `xcode-select` command and returns the `stdout` output if the
124 pub fn run_xcode_select(arguments: &[&str]) -> Option<String> { in run_xcode_select()
125 run_command("xcode-select", "xcode-select", arguments) in run_xcode_select()
136 "/boot/system/non-packaged/lib",
137 "/boot/system/non-packaged/develop/lib",
138 "/boot/home/config/non-packaged/lib",
139 "/boot/home/config/non-packaged/develop/lib",
150 "/usr/local/llvm*/lib*",
155 "/usr/local/opt/llvm*/lib",
158 "/usr/local/opt/llvm*/lib/llvm*/lib",
163 "C:\\LLVM\\lib",
164 "C:\\Program Files*\\LLVM\\lib",
166 // LLVM + Clang can be installed as a component of Visual Studio.
167 // https://github.com/KyleMayes/clang-sys/issues/121
168 "C:\\Program Files*\\Microsoft Visual Studio\\*\\BuildTools\\VC\\Tools\\Llvm\\**\\bin",
169 // LLVM + Clang can be installed using Scoop (https://scoop.sh).
170 // Other Windows package managers install LLVM + Clang to previously listed
171 // system-wide directories.
172 "C:\\Users\\*\\scoop\\apps\\llvm\\current\\bin",
177 "/opt/ooce/clang-*/lib",
178 "/opt/ooce/llvm-*/lib",
187 fn search_directory(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directory()
212 // The `libclang_shared` library has been renamed to `libclang-cpp` in search_directory()
214 // `libclang-cpp.so.10`) to be matched by patterns looking for in search_directory()
216 if filename.contains("-cpp.") { in search_directory()
228 fn search_directories(directory: &Path, filenames: &[String]) -> Vec<(PathBuf, String)> { in search_directories()
231 // On Windows, `libclang.dll` is usually found in the LLVM `bin` directory in search_directories()
232 // while `libclang.lib` is usually found in the LLVM `lib` directory. To in search_directories()
233 // keep things consistent with other platforms, only LLVM `lib` directories in search_directories()
235 // the LLVM `bin` directory here. in search_directories()
246 pub fn search_libclang_directories(filenames: &[String], variable: &str) -> Vec<(PathBuf, String)> { in search_libclang_directories()
266 // `llvm-config --prefix`. in search_libclang_directories()
267 if let Some(output) = run_llvm_config(&["--prefix"]) { in search_libclang_directories()
275 // `xcode-select --print-path`. in search_libclang_directories()
277 if let Some(output) = run_xcode_select(&["--print-path"]) { in search_libclang_directories()