Reviewers: Jakob,
Description:
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]
Please review this at https://codereview.chromium.org/18181006/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M build/standalone.gypi
M preparser/preparser.gyp
M samples/samples.gyp
M src/d8.gyp
M src/third_party/vtune/v8vtune.gyp
M test/cctest/cctest.gyp
M tools/gyp/v8.gyp
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index
f7ca0a66a9e7d651ca028040f1ab9f912084c8a3..f429e4c26277b282c842e79c5c7a2b8591cb09b7
100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -30,6 +30,7 @@
{
'variables': {
'component%': 'static_library',
+ 'clang%': 0,
'visibility%': 'hidden',
'v8_enable_backtrace%': 0,
'msvs_multi_core_compile%': '1',
@@ -65,6 +66,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 \
@@ -81,8 +89,19 @@
'arm_fpu%': 'vfpv3',
'arm_float_abi%': 'default',
'arm_thumb': 'default',
+
+ 'conditions': [
+ ['OS == "win"', {
+ 'os_posix%': 0,
+ }, {
+ 'os_posix%': 1,
+ }],
+ ],
},
'target_defaults': {
+ 'variables': {
+ 'v8_code%': '<(v8_code)',
+ },
'default_configuration': 'Debug',
'configurations': {
'Debug': {
@@ -92,6 +111,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" \
Index: preparser/preparser.gyp
diff --git a/preparser/preparser.gyp b/preparser/preparser.gyp
index
863a2ff8a940bf0ca12bc4c33805ea404aaf7f09..598f0a511e1a6509320969c0379b3a5b818b6a80
100644
--- a/preparser/preparser.gyp
+++ b/preparser/preparser.gyp
@@ -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': [
{
Index: samples/samples.gyp
diff --git a/samples/samples.gyp b/samples/samples.gyp
index
3c720a748a19a146fcbae8d05bccdd27bb752b28..8b1de7eb426632966e416781ece2ca651ec9edb4
100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -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',
Index: src/d8.gyp
diff --git a/src/d8.gyp b/src/d8.gyp
index
ea043dcf4f7e534c23cc7d04791281bfef9a2646..47a7cc01187b00203b4881c826e7a3a1a85aa042
100644
--- a/src/d8.gyp
+++ b/src/d8.gyp
@@ -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',
Index: src/third_party/vtune/v8vtune.gyp
diff --git a/src/third_party/vtune/v8vtune.gyp
b/src/third_party/vtune/v8vtune.gyp
index
cabd37ac7f6beaa241cc1d7e5dd9501227c19916..6c3de3e01147cb7ffc91dd700488fd5e03d468f5
100644
--- a/src/third_party/vtune/v8vtune.gyp
+++ b/src/third_party/vtune/v8vtune.gyp
@@ -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': [
{
Index: test/cctest/cctest.gyp
diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp
index
08110930116d7f95dccbcc02a6d74bc5018111d6..a65de867dc40d76c1da71873576e474ac6f885ca
100644
--- a/test/cctest/cctest.gyp
+++ b/test/cctest/cctest.gyp
@@ -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',
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index
ed37e72261d3cddefb4888a6037a16aebd1b95bc..5ff229a0a42f0acbfba48b2171f600a938ddf67a
100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -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.