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

Side by Side Diff: SConstruct

Issue 18309: Support for building V8 with MinGW. This patch is from gdschaefer. In additio... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 11 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 | « no previous file | src/cpu-ia32.cc » ('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 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 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
(...skipping 24 matching lines...) Expand all
35 sys.path.append(join(root_dir, 'tools')) 35 sys.path.append(join(root_dir, 'tools'))
36 import js2c, utils 36 import js2c, utils
37 37
38 38
39 LIBRARY_FLAGS = { 39 LIBRARY_FLAGS = {
40 'all': { 40 'all': {
41 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'] 41 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING']
42 }, 42 },
43 'gcc': { 43 'gcc': {
44 'all': { 44 'all': {
45 'DIALECTFLAGS': ['-ansi'],
46 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 45 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
47 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], 46 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
48 'LIBS': ['pthread']
49 }, 47 },
50 'mode:debug': { 48 'mode:debug': {
51 'CCFLAGS': ['-g', '-O0'], 49 'CCFLAGS': ['-g', '-O0'],
52 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'] 50 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG']
53 }, 51 },
54 'mode:release': { 52 'mode:release': {
55 'CCFLAGS': ['-O3', '-fomit-frame-pointer'] 53 'CCFLAGS': ['-O3', '-fomit-frame-pointer']
56 }, 54 },
55 'os:linux': {
56 'CCFLAGS': ['-ansi'],
57 },
58 'os:macos': {
59 'CCFLAGS': ['-ansi'],
60 },
57 'os:freebsd': { 61 'os:freebsd': {
58 'LIBS': ['execinfo'] 62 'CCFLAGS': ['-ansi'],
63 },
64 'os:win32': {
65 'CCFLAGS': ['-DWIN32'],
66 'CXXFLAGS': ['-DWIN32'],
59 }, 67 },
60 'wordsize:64': { 68 'wordsize:64': {
61 'CCFLAGS': ['-m32'], 69 'CCFLAGS': ['-m32'],
62 'LINKFLAGS': ['-m32'] 70 'LINKFLAGS': ['-m32']
63 } 71 }
64 }, 72 },
65 'msvc': { 73 'msvc': {
66 'all': { 74 'all': {
67 'DIALECTFLAGS': ['/nologo'], 75 'DIALECTFLAGS': ['/nologo'],
68 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 76 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 V8_EXTRA_FLAGS = { 110 V8_EXTRA_FLAGS = {
103 'gcc': { 111 'gcc': {
104 'all': { 112 'all': {
105 'CXXFLAGS': [], #['-fvisibility=hidden'], 113 'CXXFLAGS': [], #['-fvisibility=hidden'],
106 'WARNINGFLAGS': ['-pedantic', '-Wall', '-Werror', '-W', 114 'WARNINGFLAGS': ['-pedantic', '-Wall', '-Werror', '-W',
107 '-Wno-unused-parameter'] 115 '-Wno-unused-parameter']
108 }, 116 },
109 'arch:arm': { 117 'arch:arm': {
110 'CPPDEFINES': ['ARM'] 118 'CPPDEFINES': ['ARM']
111 }, 119 },
120 'os:win32': {
121 'WARNINGFLAGS': ['-Wno-long-long']
122 },
112 'disassembler:on': { 123 'disassembler:on': {
113 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] 124 'CPPDEFINES': ['ENABLE_DISASSEMBLER']
114 } 125 }
115 }, 126 },
116 'msvc': { 127 'msvc': {
117 'all': { 128 'all': {
118 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800'] 129 'WARNINGFLAGS': ['/W3', '/WX', '/wd4355', '/wd4800']
119 }, 130 },
120 'library:shared': { 131 'library:shared': {
121 'CPPDEFINES': ['BUILDING_V8_SHARED'] 132 'CPPDEFINES': ['BUILDING_V8_SHARED']
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 179
169 CCTEST_EXTRA_FLAGS = { 180 CCTEST_EXTRA_FLAGS = {
170 'all': { 181 'all': {
171 'CPPPATH': [join(root_dir, 'src')], 182 'CPPPATH': [join(root_dir, 'src')],
172 'LIBS': ['$LIBRARY'] 183 'LIBS': ['$LIBRARY']
173 }, 184 },
174 'gcc': { 185 'gcc': {
175 'all': { 186 'all': {
176 'LIBPATH': [abspath('.')] 187 'LIBPATH': [abspath('.')]
177 }, 188 },
189 'os:linux': {
190 'LIBS': ['pthread'],
191 },
192 'os:macos': {
193 'LIBS': ['pthread'],
194 },
195 'os:freebsd': {
196 'LIBS': ['execinfo', 'pthread']
197 },
198 'os:win32': {
199 'LIBS': ['winmm']
200 },
178 'wordsize:64': { 201 'wordsize:64': {
179 'CCFLAGS': ['-m32'], 202 'CCFLAGS': ['-m32'],
180 'LINKFLAGS': ['-m32'] 203 'LINKFLAGS': ['-m32']
181 }, 204 },
182 }, 205 },
183 'msvc': { 206 'msvc': {
184 'all': { 207 'all': {
185 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'] 208 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'],
209 'LIBS': ['winmm']
186 }, 210 },
187 'library:shared': { 211 'library:shared': {
188 'CPPDEFINES': ['USING_V8_SHARED'] 212 'CPPDEFINES': ['USING_V8_SHARED']
189 } 213 }
190 } 214 }
191 } 215 }
192 216
193 217
194 SAMPLE_FLAGS = { 218 SAMPLE_FLAGS = {
195 'all': { 219 'all': {
196 'CPPPATH': [join(abspath('.'), 'include')], 220 'CPPPATH': [join(abspath('.'), 'include')],
197 'LIBS': ['$LIBRARY'], 221 'LIBS': ['$LIBRARY'],
198 }, 222 },
199 'gcc': { 223 'gcc': {
200 'all': { 224 'all': {
201 'LIBS': ['pthread'],
202 'LIBPATH': ['.'] 225 'LIBPATH': ['.']
203 }, 226 },
227 'os:linux': {
228 'LIBS': ['pthread'],
229 },
230 'os:macos': {
231 'LIBS': ['pthread'],
232 },
204 'os:freebsd': { 233 'os:freebsd': {
205 'LIBS': ['execinfo'] 234 'LIBS': ['execinfo', 'pthread']
235 },
236 'os:win32': {
237 'LIBS': ['winmm']
206 }, 238 },
207 'wordsize:64': { 239 'wordsize:64': {
208 'CCFLAGS': ['-m32'], 240 'CCFLAGS': ['-m32'],
209 'LINKFLAGS': ['-m32'] 241 'LINKFLAGS': ['-m32']
210 }, 242 },
211 'mode:release': { 243 'mode:release': {
212 'CCFLAGS': ['-O2'] 244 'CCFLAGS': ['-O2']
213 }, 245 },
214 'mode:debug': { 246 'mode:debug': {
215 'CCFLAGS': ['-g', '-O0'] 247 'CCFLAGS': ['-g', '-O0']
216 } 248 }
217 }, 249 },
218 'msvc': { 250 'msvc': {
219 'all': { 251 'all': {
220 'CCFLAGS': ['/nologo'], 252 'CCFLAGS': ['/nologo'],
221 'LINKFLAGS': ['/nologo'], 253 'LINKFLAGS': ['/nologo'],
254 'LIBS': ['winmm']
222 }, 255 },
223 'library:shared': { 256 'library:shared': {
224 'CPPDEFINES': ['USING_V8_SHARED'] 257 'CPPDEFINES': ['USING_V8_SHARED']
225 }, 258 },
226 'prof:on': { 259 'prof:on': {
227 'LINKFLAGS': ['/MAP'] 260 'LINKFLAGS': ['/MAP']
228 }, 261 },
229 'mode:release': { 262 'mode:release': {
230 'CCFLAGS': ['/O2'], 263 'CCFLAGS': ['/O2'],
231 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'], 264 'LINKFLAGS': ['/OPT:REF', '/OPT:ICF', '/LTCG'],
(...skipping 15 matching lines...) Expand all
247 } 280 }
248 } 281 }
249 } 282 }
250 } 283 }
251 284
252 285
253 D8_FLAGS = { 286 D8_FLAGS = {
254 'gcc': { 287 'gcc': {
255 'console:readline': { 288 'console:readline': {
256 'LIBS': ['readline'] 289 'LIBS': ['readline']
290 },
291 'os:linux': {
292 'LIBS': ['pthread'],
293 },
294 'os:macos': {
295 'LIBS': ['pthread'],
296 },
297 'os:freebsd': {
298 'LIBS': ['pthread'],
299 },
300 'os:win32': {
301 'LIBS': ['winmm'],
302 },
303 },
304 'msvc': {
305 'all': {
306 'LIBS': ['winmm']
257 } 307 }
258 }, 308 }
259 } 309 }
260 310
261 311
262 SUFFIXES = { 312 SUFFIXES = {
263 'release': '', 313 'release': '',
264 'debug': '_g' 314 'debug': '_g'
265 } 315 }
266 316
267 317
268 def Abort(message): 318 def Abort(message):
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 # version of scons. Also, there's a bug in some revisions that 647 # version of scons. Also, there's a bug in some revisions that
598 # doesn't allow this flag to be set, so we swallow any exceptions. 648 # doesn't allow this flag to be set, so we swallow any exceptions.
599 # Lovely. 649 # Lovely.
600 try: 650 try:
601 SetOption('warn', 'no-deprecated') 651 SetOption('warn', 'no-deprecated')
602 except: 652 except:
603 pass 653 pass
604 654
605 655
606 Build() 656 Build()
OLDNEW
« no previous file with comments | « no previous file | src/cpu-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698