Lines Matching +full:libclang +full:- +full:version
1 // SPDX-License-Identifier: Apache-2.0
15 /// Clang static libraries required to link to `libclang` 3.5 and later.
33 fn get_library_name(path: &Path) -> Option<String> { in get_library_name()
44 /// Gets the LLVM static libraries required to link to `libclang`.
45 fn get_llvm_libraries() -> Vec<String> { in get_llvm_libraries()
46 common::run_llvm_config(&["--libs"]) in get_llvm_libraries()
50 // Depending on the version of `llvm-config` in use, listed in get_llvm_libraries()
52 // or simply prefixed with `-l`. in get_llvm_libraries()
53 if let Some(path) = p.strip_prefix("-l") { in get_llvm_libraries()
62 /// Gets the Clang static libraries required to link to `libclang`.
63 fn get_clang_libraries<P: AsRef<Path>>(directory: P) -> Vec<String> { in get_clang_libraries()
69 let pattern = directory.join("libclang*.a").to_str().unwrap().to_owned(); in get_clang_libraries()
81 fn find() -> PathBuf { in find()
83 "libclang.lib" in find()
85 "libclang.a" in find()
100 /// Finds and links to `libclang` static libraries.
107 println!("cargo:rustc-link-search=native={}", directory.display()); in link()
109 println!("cargo:rustc-link-lib=static={}", library); in link()
113 let mode = common::run_llvm_config(&["--shared-mode"]).map(|m| m.trim().to_owned()); in link()
122 "cargo:rustc-link-search=native={}", in link()
123 common::run_llvm_config(&["--libdir"]).unwrap().trim_end() in link()
126 println!("cargo:rustc-link-lib={}{}", prefix, library); in link()
132 println!("cargo:rustc-flags=-l ffi -l ncursesw -l c++ -l z"); in link()
134 println!("cargo:rustc-flags=-l ffi -l ncursesw -l stdc++ -l z"); in link()
136 println!("cargo:rustc-flags=-l ffi -l ncurses -l c++ -l z"); in link()