From fd969fcaed914d41a16f6d8946f77e366f9fda34 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Wed, 18 May 2022 01:27:02 -0400 Subject: [PATCH] Support illumos / omnios during libclang search (#141) Search for libclang under /opt/ooce/ when running on an illumos derivative. --- build/common.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/common.rs b/build/common.rs index bc720ca..735d5da 100644 --- a/build/common.rs +++ b/build/common.rs @@ -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 { &[] };