Support illumos / omnios during libclang search (#141)

Search for libclang under /opt/ooce/ when running on an illumos
derivative.
This commit is contained in:
James MacMahon
2022-05-18 01:27:02 -04:00
committed by GitHub
parent 50910025cf
commit fd969fcaed
+8
View File
@@ -172,6 +172,12 @@ const DIRECTORIES_WINDOWS: &[&str] = &[
"C:\\Users\\*\\scoop\\apps\\llvm\\current\\bin",
];
/// `libclang` directory patterns for illumos
const DIRECTORIES_ILLUMOS: &[&str] = &[
"/opt/ooce/clang-*/lib",
"/opt/ooce/llvm-*/lib",
];
//================================================
// Searching
//================================================
@@ -291,6 +297,8 @@ pub fn search_libclang_directories(filenames: &[String], variable: &str) -> Vec<
DIRECTORIES_MACOS
} else if cfg!(target_os = "windows") {
DIRECTORIES_WINDOWS
} else if cfg!(target_os = "illumos") {
DIRECTORIES_ILLUMOS
} else {
&[]
};