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 {
5858 /// Extract the info we need from llvm-config
5959
6060 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+
6462 print ( " Running llvm-config --version... " )
6563 let version = run ( llvmConfig, args: [ " --version " ] ) !
6664 . replacing ( charactersIn: . newlines, with: " " )
6765
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+
6874 // SwiftPM has a whitelisted set of cflags that it understands, and
6975 // unfortunately that includes almost everything but the include dir.
7076
You can’t perform that action at this time.
0 commit comments