Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: build/common.gypi

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « SConstruct ('k') | build/gyp_v8 » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2011 the V8 project authors. All rights reserved. 1 # Copyright 2011 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without 2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are 3 # modification, are permitted provided that the following conditions are
4 # met: 4 # met:
5 # 5 #
6 # * Redistributions of source code must retain the above copyright 6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above 8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following 9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided 10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution. 11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its 12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived 13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission. 14 # from this software without specific prior written permission.
15 # 15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 # Shared definitions for all V8-related targets.
29
28 { 30 {
29 'variables': { 31 'variables': {
30 'library%': 'static_library', 32 'use_system_v8%': 0,
31 'component%': 'static_library', 33 'msvs_use_common_release': 0,
32 'visibility%': 'hidden', 34 'gcc_version%': 'unknown',
33 'msvs_multi_core_compile%': '1', 35 'v8_compress_startup_data%': 'off',
34 'variables': {
35 'conditions': [
36 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
37 # This handles the Linux platforms we generally deal with. Anything
38 # else gets passed through, which probably won't work very well; such
39 # hosts should pass an explicit target_arch to gyp.
40 'host_arch%':
41 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm .*/arm/")',
42 }, { # OS!="linux" and OS!="freebsd" and OS!="openbsd"
43 'host_arch%': 'ia32',
44 }],
45 ],
46 },
47 'host_arch%': '<(host_arch)',
48 'target_arch%': '<(host_arch)',
49 'v8_target_arch%': '<(target_arch)', 36 'v8_target_arch%': '<(target_arch)',
37
38 # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code
39 # generated by V8 to do unaligned memory access, and setting it to 'false'
40 # will ensure that the generated code will always do aligned memory
41 # accesses. The default value of 'default' will try to determine the correct
42 # setting. Note that for Intel architectures (ia32 and x64) unaligned memory
43 # access is allowed for all CPUs.
44 'v8_can_use_unaligned_accesses%': 'default',
45
46 # Setting 'v8_can_use_vfp_instructions' to 'true' will enable use of ARM VFP
47 # instructions in the V8 generated code. VFP instructions will be enabled
48 # both for the snapshot and for the ARM target. Leaving the default value
49 # of 'false' will avoid VFP instructions in the snapshot and use CPU feature
50 # probing when running on the target.
51 'v8_can_use_vfp_instructions%': 'false',
52
53 # Setting v8_use_arm_eabi_hardfloat to true will turn on V8 support for ARM
54 # EABI calling convention where double arguments are passed in VFP
55 # registers. Note that the GCC flag '-mfloat-abi=hard' should be used as
56 # well when compiling for the ARM target.
57 'v8_use_arm_eabi_hardfloat%': 'false',
58
50 'v8_enable_debugger_support%': 1, 59 'v8_enable_debugger_support%': 1,
51 'conditions': [ 60
52 ['(target_arch=="arm" and host_arch!="arm") or \ 61 # Chrome needs this definition unconditionally. For standalone V8 builds,
53 (target_arch=="x64" and host_arch!="x64")', { 62 # it's handled in build/standalone.gypi.
54 'want_separate_host_toolset': 1, 63 'want_separate_host_toolset%': 1,
55 }, { 64
56 'want_separate_host_toolset': 0, 65 'v8_use_snapshot%': 'true',
57 }], 66 'host_os%': '<(OS)',
58 ], 67 'v8_use_liveobjectlist%': 'false',
59 }, 68 },
60 'target_defaults': { 69 'target_defaults': {
61 'default_configuration': 'Debug',
62 'conditions': [ 70 'conditions': [
63 ['v8_enable_debugger_support==1', { 71 ['v8_enable_debugger_support==1', {
64 'defines': ['ENABLE_DEBUGGER_SUPPORT',], 72 'defines': ['ENABLE_DEBUGGER_SUPPORT',],
65 }, 73 },
66 ], 74 ],
75 ['OS!="mac"', {
76 # TODO(mark): The OS!="mac" conditional is temporary. It can be
77 # removed once the Mac Chromium build stops setting target_arch to
78 # ia32 and instead sets it to mac. Other checks in this file for
79 # OS=="mac" can be removed at that time as well. This can be cleaned
80 # up once http://crbug.com/44205 is fixed.
81 'conditions': [
82 ['v8_target_arch=="arm"', {
83 'defines': [
84 'V8_TARGET_ARCH_ARM',
85 ],
86 'conditions': [
87 [ 'v8_can_use_unaligned_accesses=="true"', {
88 'defines': [
89 'CAN_USE_UNALIGNED_ACCESSES=1',
90 ],
91 }],
92 [ 'v8_can_use_unaligned_accesses=="false"', {
93 'defines': [
94 'CAN_USE_UNALIGNED_ACCESSES=0',
95 ],
96 }],
97 [ 'v8_can_use_vfp_instructions=="true"', {
98 'defines': [
99 'CAN_USE_VFP_INSTRUCTIONS',
100 ],
101 }],
102 [ 'v8_use_arm_eabi_hardfloat=="true"', {
103 'defines': [
104 'USE_EABI_HARDFLOAT=1',
105 'CAN_USE_VFP_INSTRUCTIONS',
106 ],
107 'cflags': [
108 '-mfloat-abi=hard',
109 ],
110 }, {
111 'defines': [
112 'USE_EABI_HARDFLOAT=0',
113 ],
114 }],
115 # The ARM assembler assumes the host is 32 bits,
116 # so force building 32-bit host tools.
117 ['host_arch=="x64"', {
118 'target_conditions': [
119 ['_toolset=="host"', {
120 'cflags': ['-m32'],
121 'ldflags': ['-m32'],
122 }],
123 ],
124 }],
125 ],
126 }],
127 ['v8_target_arch=="ia32"', {
128 'defines': [
129 'V8_TARGET_ARCH_IA32',
130 ],
131 }],
132 ['v8_target_arch=="mips"', {
133 'defines': [
134 'V8_TARGET_ARCH_MIPS',
135 ],
136 }],
137 ['v8_target_arch=="x64"', {
138 'defines': [
139 'V8_TARGET_ARCH_X64',
140 ],
141 }],
142 ],
143 }],
144 ['v8_use_liveobjectlist=="true"', {
145 'defines': [
146 'ENABLE_DEBUGGER_SUPPORT',
147 'INSPECTOR',
148 'OBJECT_PRINT',
149 'LIVEOBJECTLIST',
150 ],
151 }],
152 ['v8_compress_startup_data=="bz2"', {
153 'defines': [
154 'COMPRESS_STARTUP_DATA_BZ2',
155 ],
156 }],
67 ], 157 ],
68 'configurations': { 158 'configurations': {
69 'Debug': { 159 'Debug': {
70 'cflags': [ '-g', '-O0' ], 160 'defines': [
71 'defines': [ 'ENABLE_DISASSEMBLER', 'DEBUG', 'V8_ENABLE_CHECKS', 161 'DEBUG',
72 'OBJECT_PRINT' ], 162 'ENABLE_DISASSEMBLER',
163 'V8_ENABLE_CHECKS',
164 'OBJECT_PRINT',
165 ],
166 'msvs_settings': {
167 'VCCLCompilerTool': {
168 'Optimization': '0',
169
170 'conditions': [
171 ['OS=="win" and component=="shared_library"', {
172 'RuntimeLibrary': '3', # /MDd
173 }, {
174 'RuntimeLibrary': '1', # /MTd
175 }],
176 ],
177 },
178 'VCLinkerTool': {
179 'LinkIncremental': '2',
180 # For future reference, the stack size needs to be increased
181 # when building for Windows 64-bit, otherwise some test cases
182 # can cause stack overflow.
183 # 'StackReserveSize': '297152',
184 },
185 },
186 'conditions': [
187 ['OS=="freebsd" or OS=="openbsd"', {
188 'cflags': [ '-I/usr/local/include' ],
189 }],
190 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
191 'cflags': [ '-Wall', '-Werror', '-W', '-Wno-unused-parameter',
192 '-Wnon-virtual-dtor' ],
193 }],
194 ],
73 }, 195 },
74 'Release': { 196 'Release': {
75 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', 197 'conditions': [
76 '-ffunction-sections' ], 198 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
199 'cflags!': [
200 '-O2',
201 '-Os',
202 ],
203 'cflags': [
204 '-fdata-sections',
205 '-ffunction-sections',
206 '-fomit-frame-pointer',
207 '-O3',
208 ],
209 'conditions': [
210 [ 'gcc_version==44', {
211 'cflags': [
212 # Avoid crashes with gcc 4.4 in the v8 test suite.
213 '-fno-tree-vrp',
214 ],
215 }],
216 ],
217 }],
218 ['OS=="freebsd" or OS=="openbsd"', {
219 'cflags': [ '-I/usr/local/include' ],
220 }],
221 ['OS=="mac"', {
222 'xcode_settings': {
223 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
224
225 # -fstrict-aliasing. Mainline gcc
226 # enables this at -O2 and above,
227 # but Apple gcc does not unless it
228 # is specified explicitly.
229 'GCC_STRICT_ALIASING': 'YES',
230 },
231 }],
232 ['OS=="win"', {
233 'msvs_configuration_attributes': {
234 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
235 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
236 'CharacterSet': '1',
237 },
238 'msvs_settings': {
239 'VCCLCompilerTool': {
240 'Optimization': '2',
241 'InlineFunctionExpansion': '2',
242 'EnableIntrinsicFunctions': 'true',
243 'FavorSizeOrSpeed': '0',
244 'OmitFramePointers': 'true',
245 'StringPooling': 'true',
246
247 'conditions': [
248 ['OS=="win" and component=="shared_library"', {
249 'RuntimeLibrary': '2', #/MD
250 }, {
251 'RuntimeLibrary': '0', #/MT
252 }],
253 ],
254 },
255 'VCLinkerTool': {
256 'LinkIncremental': '1',
257 'OptimizeReferences': '2',
258 'OptimizeForWindows98': '1',
259 'EnableCOMDATFolding': '2',
260 # For future reference, the stack size needs to be
261 # increased when building for Windows 64-bit, otherwise
262 # some test cases can cause stack overflow.
263 # 'StackReserveSize': '297152',
264 },
265 },
266 }],
267 ],
77 }, 268 },
78 }, 269 },
79 }, 270 },
80 'conditions': [
81 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
82 'target_defaults': {
83 'cflags': [ '-Wall', '-pthread', '-fno-rtti', '-fno-exceptions',
84 '-pedantic' ],
85 'ldflags': [ '-pthread', ],
86 'conditions': [
87 [ 'target_arch=="ia32"', {
88 'cflags': [ '-m32' ],
89 'ldflags': [ '-m32' ],
90 }],
91 [ 'OS=="linux"', {
92 'cflags': [ '-ansi' ],
93 }],
94 [ 'visibility=="hidden"', {
95 'cflags': [ '-fvisibility=hidden' ],
96 }],
97 ],
98 },
99 }], # 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"'
100 ['OS=="win"', {
101 'target_defaults': {
102 'defines': [
103 'WIN32',
104 '_CRT_SECURE_NO_DEPRECATE',
105 '_CRT_NONSTDC_NO_DEPRECATE',
106 ],
107 'conditions': [
108 ['component=="static_library"', {
109 'defines': [
110 '_HAS_EXCEPTIONS=0',
111 ],
112 }],
113 ],
114 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
115 'msvs_disabled_warnings': [4355, 4800],
116 'msvs_settings': {
117 'VCCLCompilerTool': {
118 'MinimalRebuild': 'false',
119 'BufferSecurityCheck': 'true',
120 'EnableFunctionLevelLinking': 'true',
121 'RuntimeTypeInfo': 'false',
122 'WarningLevel': '3',
123 'WarnAsError': 'true',
124 'DebugInformationFormat': '3',
125 'Detect64BitPortabilityProblems': 'false',
126 'conditions': [
127 [ 'msvs_multi_core_compile', {
128 'AdditionalOptions': ['/MP'],
129 }],
130 ['component=="shared_library"', {
131 'ExceptionHandling': '1', # /EHsc
132 }, {
133 'ExceptionHandling': '0',
134 }],
135 ],
136 },
137 'VCLibrarianTool': {
138 'AdditionalOptions': ['/ignore:4221'],
139 },
140 'VCLinkerTool': {
141 'AdditionalDependencies': [
142 'ws2_32.lib',
143 ],
144 'GenerateDebugInformation': 'true',
145 'MapFileName': '$(OutDir)\\$(TargetName).map',
146 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
147 'FixedBaseAddress': '1',
148 # LinkIncremental values:
149 # 0 == default
150 # 1 == /INCREMENTAL:NO
151 # 2 == /INCREMENTAL
152 'LinkIncremental': '1',
153 # SubSystem values:
154 # 0 == not set
155 # 1 == /SUBSYSTEM:CONSOLE
156 # 2 == /SUBSYSTEM:WINDOWS
157 'SubSystem': '1',
158 },
159 },
160 },
161 }], # OS=="win"
162 ['OS=="mac"', {
163 'target_defaults': {
164 'xcode_settings': {
165 'ALWAYS_SEARCH_USER_PATHS': 'NO',
166 'GCC_C_LANGUAGE_STANDARD': 'ansi', # -ansi
167 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
168 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
169 # (Equivalent to -fPIC)
170 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
171 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
172 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
173 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
174 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
175 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
176 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
177 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
178 'GCC_VERSION': '4.2',
179 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
180 'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4
181 'PREBINDING': 'NO', # No -Wl,-prebind
182 'USE_HEADERMAP': 'NO',
183 'OTHER_CFLAGS': [
184 '-fno-strict-aliasing',
185 ],
186 'WARNING_CFLAGS': [
187 '-Wall',
188 '-Wendif-labels',
189 '-W',
190 '-Wno-unused-parameter',
191 '-Wnon-virtual-dtor',
192 ],
193 },
194 'target_conditions': [
195 ['_type!="static_library"', {
196 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
197 }],
198 ], # target_conditions
199 }, # target_defaults
200 }], # OS=="mac"
201 ],
202 } 271 }
OLDNEW
« no previous file with comments | « SConstruct ('k') | build/gyp_v8 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698