We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e1f638 commit 5c67f81Copy full SHA for 5c67f81
utils/make-pkgconfig.swift
@@ -56,8 +56,14 @@ func makeFile() throws {
56
}
57
let cllvmPath = pkgConfigDir.appendingPathComponent("cllvm.pc")
58
59
+ let brewLLVMConfig: () -> String? = {
60
+ guard let brew = which("brew") else { return nil }
61
+ guard let brewPrefix = run(brew, args: ["--prefix"]) else { return nil }
62
+ return which(brewPrefix + "/opt/llvm/bin/llvm-config")
63
+ }
64
+
65
/// Ensure we have llvm-config in the PATH
- guard let llvmConfig = which("llvm-config-3.9") ?? which("llvm-config") else {
66
+ guard let llvmConfig = which("llvm-config-3.9") ?? which("llvm-config") ?? brewLLVMConfig() else {
67
throw "Failed to find llvm-config. Ensure llvm-config is installed and " +
68
"in your PATH"
69
0 commit comments