File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -94,14 +94,7 @@ def asplode(lib)
94
94
95
95
# This is our wishlist. We use whichever flags work on the host.
96
96
# -Wall and -Wextra are included by default.
97
- usable_flags = [
98
- '-fsanitize=address' ,
99
- '-fsanitize=cfi' ,
100
- '-fsanitize=integer' ,
101
- '-fsanitize=memory' ,
102
- '-fsanitize=thread' ,
103
- '-fsanitize=undefined' ,
104
- '-Werror' ,
97
+ wishlist = [
105
98
'-Weverything' ,
106
99
'-Wno-bad-function-cast' , # rb_thread_call_without_gvl returns void * that we cast to VALUE
107
100
'-Wno-conditional-uninitialized' , # false positive in client.c
@@ -117,7 +110,21 @@ def asplode(lib)
117
110
'-Wno-switch-enum' , # result.c -- enum_field_types (when not fully covered, e.g. mysql 5.6+)
118
111
'-Wno-undef' , # rubinius :(
119
112
'-Wno-used-but-marked-unused' , # rubby :(
120
- ] . select do |flag |
113
+ ]
114
+
115
+ if ENV [ 'CI' ]
116
+ wishlist += [
117
+ '-Werror' ,
118
+ '-fsanitize=address' ,
119
+ '-fsanitize=cfi' ,
120
+ '-fsanitize=integer' ,
121
+ '-fsanitize=memory' ,
122
+ '-fsanitize=thread' ,
123
+ '-fsanitize=undefined' ,
124
+ ]
125
+ end
126
+
127
+ usable_flags = wishlist . select do |flag |
121
128
try_link ( 'int main() {return 0;}' , flag )
122
129
end
123
130
You can’t perform that action at this time.
0 commit comments