tests: fix `-cstrict` self compilation on m0 with clang
parent
4772146a7e
commit
9f6c4030f6
|
@ -57,13 +57,22 @@ fn (set ComparatorSet) satisfies(ver Version) bool {
|
|||
}
|
||||
|
||||
fn (c Comparator) satisfies(ver Version) bool {
|
||||
return match c.op {
|
||||
.gt { ver.gt(c.ver) }
|
||||
.lt { ver.lt(c.ver) }
|
||||
.ge { ver.ge(c.ver) }
|
||||
.le { ver.le(c.ver) }
|
||||
.eq { ver.eq(c.ver) }
|
||||
if c.op == .gt {
|
||||
return ver.gt(c.ver)
|
||||
}
|
||||
if c.op == .lt {
|
||||
return ver.lt(c.ver)
|
||||
}
|
||||
if c.op == .ge {
|
||||
return ver.ge(c.ver)
|
||||
}
|
||||
if c.op == .le {
|
||||
return ver.le(c.ver)
|
||||
}
|
||||
if c.op == .eq {
|
||||
return ver.eq(c.ver)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fn parse_range(input string) ?Range {
|
||||
|
|
|
@ -205,6 +205,8 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
|||
'-Wno-trigraphs' /* see stackoverflow.com/a/8435413 */,
|
||||
'-Wno-missing-braces' /* see stackoverflow.com/q/13746033 */,
|
||||
// enable additional warnings:
|
||||
'-Wno-unknown-warning' /* if a C compiler does not understand a certain flag, it should just ignore it */,
|
||||
'-Wno-unknown-warning-option' /* clang equivalent of the above */,
|
||||
'-Wdate-time',
|
||||
'-Wduplicated-branches',
|
||||
'-Wduplicated-cond',
|
||||
|
@ -264,8 +266,6 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
|||
'-Wno-enum-conversion' /* used in vlib/sokol, where C enums in C structs are typed as V structs instead */,
|
||||
'-Wno-sometimes-uninitialized' /* produced after exhaustive matches */,
|
||||
'-Wno-int-to-void-pointer-cast',
|
||||
'-Wno-unknown-warning' /* if a C compiler does not understand a certain flag, it should just ignore it */,
|
||||
'-Wno-unknown-warning-option' /* clang equivalent of the above */,
|
||||
]
|
||||
}
|
||||
if ccoptions.is_cc_gcc {
|
||||
|
|
Loading…
Reference in New Issue