|
82 | 82 | 'v8_toolset_for_shell%': 'target',
|
83 | 83 |
|
84 | 84 | 'host_os%': '<(OS)',
|
85 |
| - 'werror%': '-Werror', |
86 | 85 | # For a shared library build, results in "libv8-<(soname_version).so".
|
87 | 86 | 'soname_version%': '',
|
88 | 87 |
|
|
133 | 132 | '<(V8_ROOT)',
|
134 | 133 | '<(V8_ROOT)/include',
|
135 | 134 | ],
|
| 135 | + 'cflags!': ['-Wall', '-Wextra'], |
136 | 136 | 'conditions': [
|
137 |
| - ['clang==1', { |
138 |
| - 'cflags': [ '-Werror', '-Wno-unknown-pragmas' ], |
139 |
| - },{ |
140 |
| - 'cflags!': [ '-Wall', '-Wextra' ], |
| 137 | + ['clang==0 and OS!="win"', { |
141 | 138 | 'cflags': [
|
| 139 | + # In deps/v8/BUILD.gn: if (!is_clang && !is_win) { cflags += [...] } |
| 140 | + '-Wno-strict-overflow', |
142 | 141 | '-Wno-return-type',
|
| 142 | + '-Wno-int-in-bool-context', |
| 143 | + '-Wno-deprecated', |
| 144 | + '-Wno-stringop-overflow', |
| 145 | + '-Wno-stringop-overread', |
| 146 | + '-Wno-restrict', |
| 147 | + '-Wno-array-bounds', |
| 148 | + '-Wno-nonnull', |
| 149 | + '-Wno-dangling-pointer', |
143 | 150 | # On by default in Clang and V8 requires it at least for arm64.
|
144 | 151 | '-flax-vector-conversions',
|
145 | 152 | ],
|
146 | 153 | }],
|
147 | 154 | ['clang==1 or OS!="win"', {
|
148 |
| - 'cflags': [ '-Wno-invalid-offsetof' ], |
| 155 | + 'cflags_cc': [ |
| 156 | + # In deps/v8/BUILD.gn: if (is_clang || !is_win) { cflags += [...] } |
| 157 | + '-Wno-invalid-offsetof', |
| 158 | + ], |
149 | 159 | 'xcode_settings': {
|
150 |
| - 'WARNING_CFLAGS': ['-Wno-invalid-offsetof'] |
| 160 | + # -Wno-invalid-offsetof |
| 161 | + 'GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO': 'NO', |
151 | 162 | },
|
152 | 163 | }],
|
153 | 164 | ['v8_target_arch=="arm"', {
|
|
434 | 445 | ['_toolset=="target"', {
|
435 | 446 | 'conditions': [
|
436 | 447 | ['v8_target_arch==target_arch', {
|
437 |
| - 'cflags': [ |
438 |
| - '-Wno-error=array-bounds', # Workaround https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56273 |
439 |
| - ], |
440 | 448 | 'conditions': [
|
441 | 449 | ['v8_target_arch=="mips64el"', {
|
442 | 450 | 'cflags': ['-EL'],
|
|
0 commit comments