mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-06 02:09:55 +03:00
Android.bp: Ignore unknown warning flags.
Clang and Chrome build with different versions of clang which support different warning flags. Ignore unknown warning flags when building in Android. Bug: b:142320172 Change-Id: I35eb424aa5a146fec7dabf9f3aa71bd6dd9d8f50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2112282 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
@@ -217,24 +217,16 @@ def gn_cflags_to_blueprint_cflags(target_info):
|
||||
# Only forward cflags that disable warnings
|
||||
cflag_whitelist = r'^-Wno-.*$'
|
||||
|
||||
# Some clfags are not supported by the version of clang in Android
|
||||
cflag_blacklist = [
|
||||
'-Wno-bitwise-conditional-parentheses',
|
||||
'-Wno-builtin-assume-aligned-alignment',
|
||||
'-Wno-c99-designator',
|
||||
'-Wno-deprecated-copy',
|
||||
'-Wno-final-dtor-non-final-class',
|
||||
'-Wno-implicit-int-float-conversion',
|
||||
'-Wno-sizeof-array-div',
|
||||
'-Wno-misleading-indentation',
|
||||
]
|
||||
|
||||
for cflag_type in ['cflags', 'cflags_c', 'cflags_cc']:
|
||||
if cflag_type in target_info:
|
||||
for cflag in target_info[cflag_type]:
|
||||
if re.search(cflag_whitelist, cflag) and not cflag in cflag_blacklist:
|
||||
if re.search(cflag_whitelist, cflag):
|
||||
result.append(cflag)
|
||||
|
||||
# Chrome and Android use different versions of Clang which support differnt warning options.
|
||||
# Ignore errors about unrecognized warning flags.
|
||||
result.append('-Wno-unknown-warning-option')
|
||||
|
||||
if 'defines' in target_info:
|
||||
for define in target_info['defines']:
|
||||
# Don't emit ANGLE's CPU-bits define here, it will be part of the arch-specific
|
||||
|
||||
Reference in New Issue
Block a user