Reviewers: Mads Ager,
Description:
Initial support for generating Visual Studio solution and project files
using
GYP
The Windows specific part of the common.gypi now reflects the options used
for
'msvc' in the SCons build.
Please review this at http://codereview.chromium.org/6880237/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
Affected files:
M build/README.txt
M build/common.gypi
M src/d8.gyp
Index: build/README.txt
===================================================================
--- build/README.txt (revision 7691)
+++ build/README.txt (working copy)
@@ -5,21 +5,45 @@
based build system.
To use this a checkout of GYP is needed inside this directory. From the
root of
-the V8 project do the following
+the V8 project do the following:
$ svn co http://gyp.googlecode.com/svn/trunk build/gyp
To generate Makefiles and build 32-bit version on Linux:
+--------------------------------------------------------
$ GYP_DEFINES=target_arch=ia32 build/gyp_v8
$ make
To generate Makefiles and build 64-bit version on Linux:
+--------------------------------------------------------
$ GYP_DEFINES=target_arch=x64 build/gyp_v8
$ make
To generate Makefiles and build for the arm simulator on Linux:
+---------------------------------------------------------------
$ build/gyp_v8 -I build/arm.gypi
$ make
+
+To generate Visual Studio solution and project files on Windows:
+----------------------------------------------------------------
+
+On Windows an additional third party component is required. This is cygwin
in
+the same version as is used by the Chromium project. This can be checked
out
+from the Chromium repository. From the root of the V8 project do the
following:
+
+> svn co http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844
third_party/cygwin
+
+To run GYP Python is required and it is reccomended to use the same
version as
+is used by the Chromium project. This can also be checked out from the
Chromium
+repository. From the root of the V8 project do the following:
+
+> svn co
http://src.chromium.org/svn/trunk/tools/third_party/python_26@70627
third_party/python_26
+
+Now generate Visual Studio solution and project files:
+
+> third_party\python_26\python build/gyp_v8 -D target_arch=ia32
+
+Now open build\All.sln in Visual Studio.
Index: build/common.gypi
===================================================================
--- build/common.gypi (revision 7691)
+++ build/common.gypi (working copy)
@@ -77,6 +77,68 @@
}],
],
},
- }],
+ }], # 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"'
+ ['OS=="win"', {
+ 'target_defaults': {
+ 'defines': [
+ 'WIN32',
+ '_CRT_SECURE_NO_DEPRECATE',
+ '_CRT_NONSTDC_NO_DEPRECATE',
+ ],
+ 'conditions': [
+ ['component=="static_library"', {
+ 'defines': [
+ '_HAS_EXCEPTIONS=0',
+ ],
+ }],
+ ],
+ 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
+ 'msvs_disabled_warnings': [4355, 4800],
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'MinimalRebuild': 'false',
+ 'BufferSecurityCheck': 'true',
+ 'EnableFunctionLevelLinking': 'true',
+ 'RuntimeTypeInfo': 'false',
+ 'WarningLevel': '3',
+ 'WarnAsError': 'true',
+ 'DebugInformationFormat': '3',
+ 'Detect64BitPortabilityProblems': 'false',
+ 'conditions': [
+ [ 'msvs_multi_core_compile', {
+ 'AdditionalOptions': ['/MP'],
+ }],
+ ['component=="shared_library"', {
+ 'ExceptionHandling': '1', # /EHsc
+ }, {
+ 'ExceptionHandling': '0',
+ }],
+ ],
+ },
+ 'VCLibrarianTool': {
+ 'AdditionalOptions': ['/ignore:4221'],
+ },
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'ws2_32.lib',
+ ],
+ 'GenerateDebugInformation': 'true',
+ 'MapFileName': '$(OutDir)\\$(TargetName).map',
+ 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
+ 'FixedBaseAddress': '1',
+ # LinkIncremental values:
+ # 0 == default
+ # 1 == /INCREMENTAL:NO
+ # 2 == /INCREMENTAL
+ 'LinkIncremental': '1',
+ # SubSystem values:
+ # 0 == not set
+ # 1 == /SUBSYSTEM:CONSOLE
+ # 2 == /SUBSYSTEM:WINDOWS
+ 'SubSystem': '1',
+ },
+ },
+ },
+ }]
],
}
Index: src/d8.gyp
===================================================================
--- src/d8.gyp (revision 7691)
+++ src/d8.gyp (working copy)
@@ -52,6 +52,9 @@
[ 'OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd" or
OS=="solaris"', {
'sources': [ 'd8-posix.cc', ]
}],
+ [ 'OS=="win"', {
+ 'sources': [ 'd8-windows.cc', ]
+ }],
],
},
{
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev