Added release_extra_cflags only to the target compiles.
Without this CL, the gyp define release_extra_cflags is applied to both host and
target compiles. With this CL, the gyp define is only applied to the target
compiles.
BUG=v8:2157
TEST=gyp_chromium with extra flags. Made sure that the target mk files like
v8_shell.host.mk did not have the flags while v8_nosnapshot.target.mk had the
flags.
Review URL: https://chromiumcodereview.appspot.com/10456020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139909 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/build/common.gypi b/build/common.gypi
index 5871abbf..606c45b 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1734,8 +1734,12 @@
},
'conditions': [
['OS=="linux"', {
- 'cflags': [
- '<@(debug_extra_cflags)',
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '<@(debug_extra_cflags)',
+ ],
+ }],
],
}],
['release_valgrind_build==0', {
@@ -1826,8 +1830,12 @@
'defines': ['NO_TCMALLOC'],
}],
['OS=="linux"', {
- 'cflags': [
- '<@(release_extra_cflags)',
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '<@(release_extra_cflags)',
+ ],
+ }],
],
}],
],