mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: fix -cstrict
self compilation on m0 with clang
This commit is contained in:
parent
4772146a7e
commit
9f6c4030f6
@ -57,13 +57,22 @@ fn (set ComparatorSet) satisfies(ver Version) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn (c Comparator) satisfies(ver Version) bool {
|
fn (c Comparator) satisfies(ver Version) bool {
|
||||||
return match c.op {
|
if c.op == .gt {
|
||||||
.gt { ver.gt(c.ver) }
|
return 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 == .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 {
|
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-trigraphs' /* see stackoverflow.com/a/8435413 */,
|
||||||
'-Wno-missing-braces' /* see stackoverflow.com/q/13746033 */,
|
'-Wno-missing-braces' /* see stackoverflow.com/q/13746033 */,
|
||||||
// enable additional warnings:
|
// 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',
|
'-Wdate-time',
|
||||||
'-Wduplicated-branches',
|
'-Wduplicated-branches',
|
||||||
'-Wduplicated-cond',
|
'-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-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-sometimes-uninitialized' /* produced after exhaustive matches */,
|
||||||
'-Wno-int-to-void-pointer-cast',
|
'-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 {
|
if ccoptions.is_cc_gcc {
|
||||||
|
Loading…
Reference in New Issue
Block a user