Skip to content

Commit 5f7fc1f

Browse files
committed
Adjust clang version check; reduce min clang version to 14
The default clang version on Ubuntu on Gradescope is actually 14, so we'll start there and see if any problems arise.
1 parent a51ca1e commit 5f7fc1f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

a86/check-assembler.rkt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
(provide check-clang-available
44
clang-version
5-
clang-version-16+?)
5+
clang-version-14+?)
66

77
(require racket/gui/dynamic)
88

@@ -44,17 +44,17 @@ HERE
4444
"")))
4545
(get-output-string (current-output-port)))))
4646

47-
(define (clang-version-16+?)
47+
(define (clang-version-14+?)
4848
(match (clang-version)
4949
[(list major _ _)
50-
(>= major 16)]
50+
(>= major 14)]
5151
[_ #f]))
5252

5353
;; -> [Maybe (list Natural Natural Natural)]
5454
(define (clang-version)
5555
(match (clang-version-string)
5656
[#f #f]
57-
[(regexp #rx"version ([0-9]+)\\.([0-9]+)\\.([0-9]+) "
57+
[(regexp #rx"clang version ([0-9]+)\\.([0-9]+)\\.([0-9]+)"
5858
(list _
5959
(app string->number major)
6060
(app string->number minor)
@@ -68,5 +68,5 @@ HERE
6868
(error (format clang-missing-msg
6969
(getenv "PATH")
7070
(if (and (drracket?) (macos?) (launched-with-finder?)) finder-launch-msg ""))))
71-
(unless (clang-version-16+?)
71+
(unless (clang-version-14+?)
7272
(eprintf "clang 16.0.0 or later is recommended; some features may not work as expected.\n")))

a86/test/expressions.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
(check-equal? (ev '(! 0)) 1)
1010
(check-equal? (ev '(~ 0)) -1)
1111

12-
(when (clang-version-16+?)
12+
(when (clang-version-14+?)
1313
(check-equal? (ev '(< 1 2)) 1)
1414
(check-equal? (ev '(< 2 1)) 0)
1515
(check-equal? (ev '(? 1 2 3)) 2)

0 commit comments

Comments
 (0)