File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,19 @@ func makeFile() throws {
58
58
/// Extract the info we need from llvm-config
59
59
60
60
print ( " Found llvm-config at \( llvmConfig) ... " )
61
- print ( " Running llvm-config --libs all... " )
62
- let ldFlags = run ( llvmConfig, args: [ " --libs " , " all " ] ) !
63
- . replacing ( charactersIn: . newlines, with: " " )
61
+
64
62
print ( " Running llvm-config --version... " )
65
63
let version = run ( llvmConfig, args: [ " --version " ] ) !
66
64
. replacing ( charactersIn: . newlines, with: " " )
67
65
66
+ guard version. hasPrefix ( " 3.9 " ) else {
67
+ throw " LLVMSwift requires LLVM version >=3.9.0, but you have \( version) "
68
+ }
69
+
70
+ print ( " Running llvm-config --libs all... " )
71
+ let ldFlags = run ( llvmConfig, args: [ " --libs " , " all " ] ) !
72
+ . replacing ( charactersIn: . newlines, with: " " )
73
+
68
74
// SwiftPM has a whitelisted set of cflags that it understands, and
69
75
// unfortunately that includes almost everything but the include dir.
70
76
You can’t perform that action at this time.
0 commit comments