Some compiler flags are clang only
This commit is contained in:
parent
4f9c5310a9
commit
0d8cfe8dbe
5 changed files with 38 additions and 15 deletions
|
@ -69,21 +69,29 @@
|
||||||
},
|
},
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
||||||
# Needed by using libgtkui:
|
|
||||||
'-Wno-deprecated-register',
|
|
||||||
'-Wno-sentinel',
|
|
||||||
],
|
|
||||||
'cflags_cc': [
|
|
||||||
'-Wno-reserved-user-defined-literal',
|
|
||||||
],
|
],
|
||||||
'direct_dependent_settings': {
|
'direct_dependent_settings': {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
'<!@(<(pkg-config) --cflags <(linux_system_libraries))',
|
||||||
'-Wno-deprecated-register',
|
|
||||||
'-Wno-sentinel',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
['clang==1', {
|
||||||
|
'cflags_cc': [
|
||||||
|
'-Wno-reserved-user-defined-literal',
|
||||||
|
],
|
||||||
|
'cflags': [
|
||||||
|
# Needed by using libgtkui:
|
||||||
|
'-Wno-deprecated-register',
|
||||||
|
'-Wno-sentinel',
|
||||||
|
],
|
||||||
|
'direct_dependent_settings': {
|
||||||
|
'cflags': [
|
||||||
|
'-Wno-deprecated-register',
|
||||||
|
'-Wno-sentinel',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}],
|
||||||
['libchromiumcontent_component', {
|
['libchromiumcontent_component', {
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
|
|
|
@ -348,7 +348,7 @@
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
['OS=="linux"', {
|
['OS=="linux" and clang==1', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-Wno-inconsistent-missing-override',
|
'-Wno-inconsistent-missing-override',
|
||||||
'-Wno-undefined-var-template', # https://crbug.com/604888
|
'-Wno-undefined-var-template', # https://crbug.com/604888
|
||||||
|
|
15
common.gypi
15
common.gypi
|
@ -109,22 +109,27 @@
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-Wno-parentheses-equality',
|
|
||||||
'-Wno-unused-function',
|
'-Wno-unused-function',
|
||||||
'-Wno-sometimes-uninitialized',
|
|
||||||
'-Wno-pointer-sign',
|
|
||||||
'-Wno-string-plus-int',
|
|
||||||
'-Wno-unused-variable',
|
'-Wno-unused-variable',
|
||||||
'-Wno-unused-value',
|
'-Wno-unused-value',
|
||||||
'-Wno-deprecated-declarations',
|
'-Wno-deprecated-declarations',
|
||||||
'-Wno-return-type',
|
'-Wno-return-type',
|
||||||
'-Wno-shift-negative-value',
|
|
||||||
'-Wno-format',
|
'-Wno-format',
|
||||||
'-Wno-varargs', # https://git.io/v6Olj
|
'-Wno-varargs', # https://git.io/v6Olj
|
||||||
# Required when building as shared library.
|
# Required when building as shared library.
|
||||||
'-fPIC',
|
'-fPIC',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
['OS=="linux" and clang==1', {
|
||||||
|
'cflags': [
|
||||||
|
'-Wno-pointer-sign',
|
||||||
|
'-Wno-parentheses-equality',
|
||||||
|
'-Wno-sometimes-uninitialized',
|
||||||
|
'-Wno-string-plus-int',
|
||||||
|
'-Wno-shift-negative-value',
|
||||||
|
'-Wno-reserved-user-defined-literal',
|
||||||
|
],
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['_target_name=="node"', {
|
['_target_name=="node"', {
|
||||||
|
|
|
@ -358,7 +358,6 @@
|
||||||
# Required settings of using breakpad.
|
# Required settings of using breakpad.
|
||||||
'cflags_cc': [
|
'cflags_cc': [
|
||||||
'-Wno-empty-body',
|
'-Wno-empty-body',
|
||||||
'-Wno-reserved-user-defined-literal',
|
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'vendor/breakpad/src',
|
'vendor/breakpad/src',
|
||||||
|
@ -367,6 +366,12 @@
|
||||||
'vendor/breakpad/breakpad.gyp:breakpad_client',
|
'vendor/breakpad/breakpad.gyp:breakpad_client',
|
||||||
],
|
],
|
||||||
}], # OS=="linux"
|
}], # OS=="linux"
|
||||||
|
['OS=="linux" and clang==1', {
|
||||||
|
# Required settings of using breakpad.
|
||||||
|
'cflags_cc': [
|
||||||
|
'-Wno-reserved-user-defined-literal',
|
||||||
|
],
|
||||||
|
}], # OS=="linux" and clang==1
|
||||||
],
|
],
|
||||||
}, # target <(product_name)_lib
|
}, # target <(product_name)_lib
|
||||||
{
|
{
|
||||||
|
|
|
@ -143,6 +143,11 @@
|
||||||
['CC.host', '$(CC)'],
|
['CC.host', '$(CC)'],
|
||||||
['CXX.host', '$(CXX)'],
|
['CXX.host', '$(CXX)'],
|
||||||
],
|
],
|
||||||
|
'target_defaults': {
|
||||||
|
'cflags_cc': [
|
||||||
|
'-std=c++11',
|
||||||
|
],
|
||||||
|
},
|
||||||
}],
|
}],
|
||||||
|
|
||||||
# Specify the SDKROOT.
|
# Specify the SDKROOT.
|
||||||
|
|
Loading…
Reference in a new issue