Permalink
Browse files

Add support for building Xcode project files from GYP files

Removed the current Xcode project file.

Fixed a few places where the C++ compiler supplied with Xcode produced warnings.
Review URL: http://codereview.chromium.org/7134016

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@8228 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information...
1 parent 7d77c1c commit 80ff3e184f18f50b87d05768c64148f4bbb936f5 sgjesse@chromium.org committed Jun 9, 2011
Showing with 83 additions and 2,773 deletions.
  1. +30 −6 build/README.txt
  2. +40 −1 build/common.gypi
  3. +1 −1 samples/process.cc
  4. +1 −1 src/type-info.cc
  5. +11 −0 tools/v8.xcodeproj/README.txt
  6. +0 −2,764 tools/v8.xcodeproj/project.pbxproj
View
@@ -9,23 +9,47 @@ the V8 project do the following:
$ svn co http://gyp.googlecode.com/svn/trunk build/gyp
+Note for the command lines below that Debug is the default configuration,
+so specifying that on the command lines is not required.
+
+
To generate Makefiles and build 32-bit version on Linux:
--------------------------------------------------------
-$ GYP_DEFINES=target_arch=ia32 build/gyp_v8
-$ make
+$ build/gyp_v8 -D target_arch=ia32
+$ make BUILDTYPE=Debug
+$ out/Debug/shell
+$ make BUILDTYPE=Release
+$ out/Release/shell
To generate Makefiles and build 64-bit version on Linux:
--------------------------------------------------------
-$ GYP_DEFINES=target_arch=x64 build/gyp_v8
-$ make
+$ build/gyp_v8 -D target_arch=x64
+$ make BUILDTYPE=Debug
+$ out/Debug/shell
+$ make BUILDTYPE=Release
+$ out/Release/shell
To generate Makefiles and build for the arm simulator on Linux:
---------------------------------------------------------------
-$ build/gyp_v8 -I build/arm.gypi
-$ make
+$ build/gyp_v8 -I build/armu.gypi
+$ make BUILDTYPE=Debug
+$ out/Debug/shell
+$ make BUILDTYPE=Release
+$ out/Release/shell
+
+
+To generate Xcode project files on Mac OS:
+------------------------------------------
+
+$ build/gyp_v8 -D target_arch=ia32
+$ xcodebuild -project build/all.xcodeproj -configuration Debug
+$ samples/build/Debug/shell
+$ xcodebuild -project build/all.xcodeproj -configuration Release
+$ samples/build/Release/shell
+
To generate Visual Studio solution and project files on Windows:
----------------------------------------------------------------
View
@@ -139,6 +139,45 @@
},
},
},
- }]
+ }], # OS=="win"
+ ['OS=="mac"', {
+ 'target_defaults': {
+ 'xcode_settings': {
+ 'ALWAYS_SEARCH_USER_PATHS': 'NO',
+ 'GCC_C_LANGUAGE_STANDARD': 'ansi', # -ansi
+ 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
+ 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
+ # (Equivalent to -fPIC)
+ 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
+ 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
+ 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
+ # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
+ 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
+ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
+ 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
+ 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
+ 'GCC_VERSION': '4.2',
+ 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
+ 'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
+ 'PREBINDING': 'NO', # No -Wl,-prebind
+ 'USE_HEADERMAP': 'NO',
+ 'OTHER_CFLAGS': [
+ '-fno-strict-aliasing',
+ ],
+ 'WARNING_CFLAGS': [
+ '-Wall',
+ '-Wendif-labels',
+ '-W',
+ '-Wno-unused-parameter',
+ '-Wnon-virtual-dtor',
+ ],
+ },
+ 'target_conditions': [
+ ['_type!="static_library"', {
+ 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
+ }],
+ ], # target_conditions
+ }, # target_defaults
+ }], # OS=="mac"
],
}
View
@@ -535,7 +535,7 @@ void ParseOptions(int argc,
string* file) {
for (int i = 1; i < argc; i++) {
string arg = argv[i];
- int index = arg.find('=', 0);
+ size_t index = arg.find('=', 0);
if (index == string::npos) {
*file = arg;
} else {
View
@@ -407,7 +407,7 @@ void TypeFeedbackOracle::SetInfo(unsigned ast_id, Object* target) {
MaybeObject* maybe_result = dictionary_->AtNumberPut(ast_id, target);
USE(maybe_result);
#ifdef DEBUG
- Object* result;
+ Object* result = NULL;
// Dictionary has been allocated with sufficient size for all elements.
ASSERT(maybe_result->ToObject(&result));
ASSERT(*dictionary_ == result);
@@ -0,0 +1,11 @@
+The Xcode project for V8 has been retired. If an Xcode project
+is needed for building on a Mac there is the option of using GYP to
+generate it. Please look in the build directory in the root of the
+V8 project. It contains the required infrastructure and a README.txt
+file explaining how to get started.
+
+Generating Xcode projects using GYP is how the Chromium
+project integrated V8 into the Mac build.
+
+The main build system for V8 is still SCons, see
+http://code.google.com/apis/v8/build.html for details.
Oops, something went wrong.

0 comments on commit 80ff3e1

Please sign in to comment.