зеркало из https://github.com/microsoft/angle.git
Add angle_code var to common.gypi and build_angle.gyp. Add GCC and clang warning flags from WebKit to ANGLE Mac and Linux builds.
The angle_code var differentiates between core ANGLE code vs. test code, sample code, and third party code. Review URL: https://codereview.appspot.com/6427049/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1244 736b8ea6-26fd-11df-bfd4-992fa37f6226
This commit is contained in:
Родитель
728f279824
Коммит
28a6b5f8da
|
@ -5,6 +5,26 @@
|
||||||
{
|
{
|
||||||
'variables': {
|
'variables': {
|
||||||
'component%': 'static_library',
|
'component%': 'static_library',
|
||||||
|
# angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp.
|
||||||
|
# angle_code is set to 0 for test code, sample code, and third party code.
|
||||||
|
# When angle_code is 1, we build with additional warning flags on Mac and Linux.
|
||||||
|
'angle_code%': 0,
|
||||||
|
'gcc_or_clang_warnings': [
|
||||||
|
'-Wall',
|
||||||
|
'-Wchar-subscripts',
|
||||||
|
'-Werror',
|
||||||
|
'-Wextra',
|
||||||
|
'-Wformat=2',
|
||||||
|
'-Winit-self',
|
||||||
|
'-Wno-sign-compare',
|
||||||
|
'-Wno-unused-function',
|
||||||
|
'-Wno-unused-parameter',
|
||||||
|
'-Wno-unknown-pragmas',
|
||||||
|
'-Wpacked',
|
||||||
|
'-Wpointer-arith',
|
||||||
|
'-Wundef',
|
||||||
|
'-Wwrite-strings',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
'default_configuration': 'Debug',
|
'default_configuration': 'Debug',
|
||||||
|
@ -130,6 +150,20 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
|
['angle_code==1', {
|
||||||
|
'target_defaults': {
|
||||||
|
'conditions': [
|
||||||
|
['OS=="mac"', {
|
||||||
|
'xcode_settings': {
|
||||||
|
'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)']
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
['OS!="win" and OS!="mac"', {
|
||||||
|
'cflags': ['<@(gcc_or_clang_warnings)']
|
||||||
|
}],
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
# found in the LICENSE file.
|
# found in the LICENSE file.
|
||||||
|
|
||||||
{
|
{
|
||||||
|
'variables': {
|
||||||
|
'angle_code': 1,
|
||||||
|
},
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
'defines': [
|
'defines': [
|
||||||
'ANGLE_DISABLE_TRACE',
|
'ANGLE_DISABLE_TRACE',
|
||||||
|
|
Загрузка…
Ссылка в новой задаче