Skip to content

Commit 80ff3e1

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
1 parent 7d77c1c commit 80ff3e1

File tree

6 files changed

+83
-2773
lines changed

6 files changed

+83
-2773
lines changed

build/README.txt

+30-6
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,47 @@ the V8 project do the following:
99

1010
$ svn co http://gyp.googlecode.com/svn/trunk build/gyp
1111

12+
Note for the command lines below that Debug is the default configuration,
13+
so specifying that on the command lines is not required.
14+
15+
1216
To generate Makefiles and build 32-bit version on Linux:
1317
--------------------------------------------------------
1418

15-
$ GYP_DEFINES=target_arch=ia32 build/gyp_v8
16-
$ make
19+
$ build/gyp_v8 -D target_arch=ia32
20+
$ make BUILDTYPE=Debug
21+
$ out/Debug/shell
22+
$ make BUILDTYPE=Release
23+
$ out/Release/shell
1724

1825
To generate Makefiles and build 64-bit version on Linux:
1926
--------------------------------------------------------
2027

21-
$ GYP_DEFINES=target_arch=x64 build/gyp_v8
22-
$ make
28+
$ build/gyp_v8 -D target_arch=x64
29+
$ make BUILDTYPE=Debug
30+
$ out/Debug/shell
31+
$ make BUILDTYPE=Release
32+
$ out/Release/shell
2333

2434
To generate Makefiles and build for the arm simulator on Linux:
2535
---------------------------------------------------------------
2636

27-
$ build/gyp_v8 -I build/arm.gypi
28-
$ make
37+
$ build/gyp_v8 -I build/armu.gypi
38+
$ make BUILDTYPE=Debug
39+
$ out/Debug/shell
40+
$ make BUILDTYPE=Release
41+
$ out/Release/shell
42+
43+
44+
To generate Xcode project files on Mac OS:
45+
------------------------------------------
46+
47+
$ build/gyp_v8 -D target_arch=ia32
48+
$ xcodebuild -project build/all.xcodeproj -configuration Debug
49+
$ samples/build/Debug/shell
50+
$ xcodebuild -project build/all.xcodeproj -configuration Release
51+
$ samples/build/Release/shell
52+
2953

3054
To generate Visual Studio solution and project files on Windows:
3155
----------------------------------------------------------------

build/common.gypi

+40-1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,45 @@
139139
},
140140
},
141141
},
142-
}]
142+
}], # OS=="win"
143+
['OS=="mac"', {
144+
'target_defaults': {
145+
'xcode_settings': {
146+
'ALWAYS_SEARCH_USER_PATHS': 'NO',
147+
'GCC_C_LANGUAGE_STANDARD': 'ansi', # -ansi
148+
'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
149+
'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
150+
# (Equivalent to -fPIC)
151+
'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
152+
'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
153+
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
154+
# GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
155+
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
156+
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
157+
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
158+
'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
159+
'GCC_VERSION': '4.2',
160+
'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
161+
'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
162+
'PREBINDING': 'NO', # No -Wl,-prebind
163+
'USE_HEADERMAP': 'NO',
164+
'OTHER_CFLAGS': [
165+
'-fno-strict-aliasing',
166+
],
167+
'WARNING_CFLAGS': [
168+
'-Wall',
169+
'-Wendif-labels',
170+
'-W',
171+
'-Wno-unused-parameter',
172+
'-Wnon-virtual-dtor',
173+
],
174+
},
175+
'target_conditions': [
176+
['_type!="static_library"', {
177+
'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
178+
}],
179+
], # target_conditions
180+
}, # target_defaults
181+
}], # OS=="mac"
143182
],
144183
}

samples/process.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ void ParseOptions(int argc,
535535
string* file) {
536536
for (int i = 1; i < argc; i++) {
537537
string arg = argv[i];
538-
int index = arg.find('=', 0);
538+
size_t index = arg.find('=', 0);
539539
if (index == string::npos) {
540540
*file = arg;
541541
} else {

src/type-info.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ void TypeFeedbackOracle::SetInfo(unsigned ast_id, Object* target) {
407407
MaybeObject* maybe_result = dictionary_->AtNumberPut(ast_id, target);
408408
USE(maybe_result);
409409
#ifdef DEBUG
410-
Object* result;
410+
Object* result = NULL;
411411
// Dictionary has been allocated with sufficient size for all elements.
412412
ASSERT(maybe_result->ToObject(&result));
413413
ASSERT(*dictionary_ == result);

tools/v8.xcodeproj/README.txt

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
The Xcode project for V8 has been retired. If an Xcode project
2+
is needed for building on a Mac there is the option of using GYP to
3+
generate it. Please look in the build directory in the root of the
4+
V8 project. It contains the required infrastructure and a README.txt
5+
file explaining how to get started.
6+
7+
Generating Xcode projects using GYP is how the Chromium
8+
project integrated V8 into the Mac build.
9+
10+
The main build system for V8 is still SCons, see
11+
http://code.google.com/apis/v8/build.html for details.

0 commit comments

Comments
 (0)