Revision: 15389
Author:   [email protected]
Date:     Fri Jun 28 08:22:46 2013
Log:      Introduce a notion of "v8_code" in gyp config files.

This allows for compiling third-party code (such as ICU) with less
strict flags.

BUG=v8:2745
[email protected]

Review URL: https://codereview.chromium.org/18181006

Patch from Jochen Eisinger <[email protected]>.
http://code.google.com/p/v8/source/detail?r=15389

Modified:
 /branches/bleeding_edge/build/standalone.gypi
 /branches/bleeding_edge/preparser/preparser.gyp
 /branches/bleeding_edge/samples/samples.gyp
 /branches/bleeding_edge/src/d8.gyp
 /branches/bleeding_edge/src/third_party/vtune/v8vtune.gyp
 /branches/bleeding_edge/test/cctest/cctest.gyp
 /branches/bleeding_edge/tools/gyp/v8.gyp

=======================================
--- /branches/bleeding_edge/build/standalone.gypi       Tue Jun 25 07:39:27 2013
+++ /branches/bleeding_edge/build/standalone.gypi       Fri Jun 28 08:22:46 2013
@@ -65,6 +65,13 @@
     'target_arch%': '<(target_arch)',
     'v8_target_arch%': '<(v8_target_arch)',
     'werror%': '-Werror',
+
+ # .gyp files or targets should set v8_code to 1 if they build V8 specific + # code, as opposed to external code. This variable is used to control such + # things as the set of warnings to enable, and whether warnings are treated
+    # as errors.
+    'v8_code%': 0,
+
     'conditions': [
       ['(v8_target_arch=="arm" and host_arch!="arm") or \
         (v8_target_arch=="mipsel" and host_arch!="mipsel") or \
@@ -74,6 +81,11 @@
       }, {
         'want_separate_host_toolset': 0,
       }],
+      ['OS == "win"', {
+        'os_posix%': 0,
+      }, {
+        'os_posix%': 1,
+      }],
     ],
     # Default ARM variable settings.
     'armv7%': 'default',
@@ -83,6 +95,9 @@
     'arm_thumb': 'default',
   },
   'target_defaults': {
+    'variables': {
+      'v8_code%': '<(v8_code)',
+    },
     'default_configuration': 'Debug',
     'configurations': {
       'Debug': {
@@ -92,6 +107,29 @@
         # Xcode insists on this empty entry.
       },
     },
+    'target_conditions': [
+      ['v8_code == 0', {
+        'conditions': [
+          ['os_posix == 1 and OS != "mac"', {
+            'cflags!': [
+              '-Werror',
+            ],
+          }],
+          ['OS == "mac"', {
+            'xcode_settings': {
+              'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',    # -Werror
+            },
+          }],
+          ['OS == "win"', {
+            'msvs_settings': {
+              'VCCLCompilerTool': {
+                'WarnAsError': 'false',
+              },
+            },
+          }],
+        ],
+      }],
+    ],
   },
   'conditions': [
     ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
=======================================
--- /branches/bleeding_edge/preparser/preparser.gyp     Fri Apr 12 02:44:08 2013
+++ /branches/bleeding_edge/preparser/preparser.gyp     Fri Jun 28 08:22:46 2013
@@ -26,6 +26,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
+  'variables': {
+    'v8_code': 1,
+  },
   'includes': ['../build/common.gypi'],
   'targets': [
     {
=======================================
--- /branches/bleeding_edge/samples/samples.gyp Mon Apr 16 02:23:56 2012
+++ /branches/bleeding_edge/samples/samples.gyp Fri Jun 28 08:22:46 2013
@@ -26,6 +26,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
+  'variables': {
+    'v8_code': 1,
+  },
   'includes': ['../build/common.gypi'],
   'target_defaults': {
     'type': 'executable',
=======================================
--- /branches/bleeding_edge/src/d8.gyp  Fri Apr 12 05:48:27 2013
+++ /branches/bleeding_edge/src/d8.gyp  Fri Jun 28 08:22:46 2013
@@ -26,12 +26,13 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
-  'includes': ['../build/common.gypi'],
   'variables': {
+    'v8_code': 1,
     'console%': '',
     # Enable support for Intel VTune. Supported on ia32/x64 only
     'v8_enable_vtunejit%': 0,
   },
+  'includes': ['../build/common.gypi'],
   'targets': [
     {
       'target_name': 'd8',
=======================================
--- /branches/bleeding_edge/src/third_party/vtune/v8vtune.gyp Fri Apr 12 05:48:27 2013 +++ /branches/bleeding_edge/src/third_party/vtune/v8vtune.gyp Fri Jun 28 08:22:46 2013
@@ -26,6 +26,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
+  'variables': {
+    'v8_code': 1,
+  },
   'includes': ['../../../build/common.gypi'],
   'targets': [
     {
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.gyp      Fri Jun 14 10:25:03 2013
+++ /branches/bleeding_edge/test/cctest/cctest.gyp      Fri Jun 28 08:22:46 2013
@@ -26,10 +26,11 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
-  'includes': ['../../build/common.gypi'],
   'variables': {
+    'v8_code': 1,
     'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
   },
+  'includes': ['../../build/common.gypi'],
   'targets': [
     {
       'target_name': 'cctest',
=======================================
--- /branches/bleeding_edge/tools/gyp/v8.gyp    Fri Jun 28 00:40:35 2013
+++ /branches/bleeding_edge/tools/gyp/v8.gyp    Fri Jun 28 08:22:46 2013
@@ -26,6 +26,9 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 {
+  'variables': {
+    'v8_code': 1,
+  },
   'includes': ['../../build/common.gypi'],
   'targets': [
     {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to