OLD | NEW |
1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 227 } |
228 }, | 228 }, |
229 'arch:x64': { | 229 'arch:x64': { |
230 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 230 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
231 'CCFLAGS': ['-m64'], | 231 'CCFLAGS': ['-m64'], |
232 'LINKFLAGS': ['-m64'], | 232 'LINKFLAGS': ['-m64'], |
233 }, | 233 }, |
234 'gdbjit:on': { | 234 'gdbjit:on': { |
235 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] | 235 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] |
236 }, | 236 }, |
| 237 'vtunejit:on': { |
| 238 'CPPDEFINES': ['ENABLE_VTUNE_JIT_INTERFACE'] |
| 239 }, |
237 'compress_startup_data:bz2': { | 240 'compress_startup_data:bz2': { |
238 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'] | 241 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'] |
239 } | 242 } |
240 }, | 243 }, |
241 'msvc': { | 244 'msvc': { |
242 'all': { | 245 'all': { |
243 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 246 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
244 'CXXFLAGS': ['/GR-', '/Gy'], | 247 'CXXFLAGS': ['/GR-', '/Gy'], |
245 'CPPDEFINES': ['WIN32'], | 248 'CPPDEFINES': ['WIN32'], |
246 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], | 249 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 'pgo:off': { | 289 'pgo:off': { |
287 'LINKFLAGS': ['/LTCG'], | 290 'LINKFLAGS': ['/LTCG'], |
288 }, | 291 }, |
289 'pgo:instrument': { | 292 'pgo:instrument': { |
290 'LINKFLAGS': ['/LTCG:PGI'] | 293 'LINKFLAGS': ['/LTCG:PGI'] |
291 }, | 294 }, |
292 'pgo:optimize': { | 295 'pgo:optimize': { |
293 'LINKFLAGS': ['/LTCG:PGO'] | 296 'LINKFLAGS': ['/LTCG:PGO'] |
294 } | 297 } |
295 } | 298 } |
| 299 }, |
| 300 'vtunejit:on': { |
| 301 'CPPDEFINES': ['ENABLE_VTUNE_JIT_INTERFACE'] |
296 } | 302 } |
297 } | 303 } |
298 } | 304 } |
299 | 305 |
300 | 306 |
301 V8_EXTRA_FLAGS = { | 307 V8_EXTRA_FLAGS = { |
302 'gcc': { | 308 'gcc': { |
303 'all': { | 309 'all': { |
304 'WARNINGFLAGS': ['-Wall', | 310 'WARNINGFLAGS': ['-Wall', |
305 '-Werror', | 311 '-Werror', |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 'CPPDEFINES': ['USING_V8_SHARED'] | 487 'CPPDEFINES': ['USING_V8_SHARED'] |
482 }, | 488 }, |
483 }, | 489 }, |
484 'gcc': { | 490 'gcc': { |
485 'all': { | 491 'all': { |
486 'LIBPATH': ['.'], | 492 'LIBPATH': ['.'], |
487 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 493 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
488 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], | 494 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], |
489 'LINKFLAGS': ['$CCFLAGS'], | 495 'LINKFLAGS': ['$CCFLAGS'], |
490 }, | 496 }, |
| 497 'vtunejit:on': { |
| 498 'LIBS': ['jitprofiling'], |
| 499 }, |
491 'os:linux': { | 500 'os:linux': { |
492 'LIBS': ['pthread'], | 501 'LIBS': ['pthread'], |
493 }, | 502 }, |
494 'os:macos': { | 503 'os:macos': { |
495 'LIBS': ['pthread'], | 504 'LIBS': ['pthread'], |
496 }, | 505 }, |
497 'os:freebsd': { | 506 'os:freebsd': { |
498 'LIBPATH' : ['/usr/local/lib'], | 507 'LIBPATH' : ['/usr/local/lib'], |
499 'LIBS': ['execinfo', 'pthread'] | 508 'LIBS': ['execinfo', 'pthread'] |
500 }, | 509 }, |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'], | 613 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'], |
605 'os:linux': { | 614 'os:linux': { |
606 'LIBS': ['bz2'] | 615 'LIBS': ['bz2'] |
607 } | 616 } |
608 }, | 617 }, |
609 }, | 618 }, |
610 'msvc': { | 619 'msvc': { |
611 'all': { | 620 'all': { |
612 'LIBS': ['winmm', 'ws2_32'] | 621 'LIBS': ['winmm', 'ws2_32'] |
613 }, | 622 }, |
| 623 'vtunejit:on': { |
| 624 'LIBS': ['jitprofiling'], |
| 625 'LINKFLAGS': ['/DEBUG'] |
| 626 }, |
614 'verbose:off': { | 627 'verbose:off': { |
615 'CCFLAGS': ['/nologo'], | 628 'CCFLAGS': ['/nologo'], |
616 'LINKFLAGS': ['/NOLOGO'] | 629 'LINKFLAGS': ['/NOLOGO'] |
617 }, | 630 }, |
618 'verbose:on': { | 631 'verbose:on': { |
619 'LINKFLAGS': ['/VERBOSE'] | 632 'LINKFLAGS': ['/VERBOSE'] |
620 }, | 633 }, |
621 'prof:on': { | 634 'prof:on': { |
622 'LINKFLAGS': ['/MAP'] | 635 'LINKFLAGS': ['/MAP'] |
623 }, | 636 }, |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 'prof': { | 1037 'prof': { |
1025 'values': ['on', 'off'], | 1038 'values': ['on', 'off'], |
1026 'default': 'off', | 1039 'default': 'off', |
1027 'help': 'enable profiling of build target' | 1040 'help': 'enable profiling of build target' |
1028 }, | 1041 }, |
1029 'gdbjit': { | 1042 'gdbjit': { |
1030 'values': ['on', 'off'], | 1043 'values': ['on', 'off'], |
1031 'default': 'off', | 1044 'default': 'off', |
1032 'help': 'enable GDB JIT interface' | 1045 'help': 'enable GDB JIT interface' |
1033 }, | 1046 }, |
| 1047 'vtunejit': { |
| 1048 'values': ['on', 'off'], |
| 1049 'default': 'off', |
| 1050 'help': 'enable VTune JIT interface' |
| 1051 }, |
1034 'library': { | 1052 'library': { |
1035 'values': ['static', 'shared'], | 1053 'values': ['static', 'shared'], |
1036 'default': 'static', | 1054 'default': 'static', |
1037 'help': 'the type of library to produce' | 1055 'help': 'the type of library to produce' |
1038 }, | 1056 }, |
1039 'objectprint': { | 1057 'objectprint': { |
1040 'values': ['on', 'off'], | 1058 'values': ['on', 'off'], |
1041 'default': 'off', | 1059 'default': 'off', |
1042 'help': 'enable object printing' | 1060 'help': 'enable object printing' |
1043 }, | 1061 }, |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 if not IsLegal(env, 'mode', ['debug', 'release']): | 1279 if not IsLegal(env, 'mode', ['debug', 'release']): |
1262 return False | 1280 return False |
1263 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): | 1281 if not IsLegal(env, 'sample', ["shell", "process", "lineprocessor"]): |
1264 return False | 1282 return False |
1265 if not IsLegal(env, 'regexp', ["native", "interpreted"]): | 1283 if not IsLegal(env, 'regexp', ["native", "interpreted"]): |
1266 return False | 1284 return False |
1267 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: | 1285 if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on'
: |
1268 Abort("Profiling on windows only supported for static library.") | 1286 Abort("Profiling on windows only supported for static library.") |
1269 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos')
or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')): | 1287 if env['gdbjit'] == 'on' and ((env['os'] != 'linux' and env['os'] != 'macos')
or (env['arch'] != 'ia32' and env['arch'] != 'x64' and env['arch'] != 'arm')): |
1270 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux/OSX target.") | 1288 Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64)
Linux/OSX target.") |
| 1289 if env['vtunejit'] == 'on' and (env['arch'] != 'ia32' and env['arch'] != 'x64'
): |
| 1290 Abort("VTUNEJIT interface is supported only for Intel architectures (ia32 or
x64)") |
1271 if env['os'] == 'win32' and env['soname'] == 'on': | 1291 if env['os'] == 'win32' and env['soname'] == 'on': |
1272 Abort("Shared Object soname not applicable for Windows.") | 1292 Abort("Shared Object soname not applicable for Windows.") |
1273 if env['soname'] == 'on' and env['library'] == 'static': | 1293 if env['soname'] == 'on' and env['library'] == 'static': |
1274 Abort("Shared Object soname not applicable for static library.") | 1294 Abort("Shared Object soname not applicable for static library.") |
1275 if env['os'] != 'win32' and env['pgo'] != 'off': | 1295 if env['os'] != 'win32' and env['pgo'] != 'off': |
1276 Abort("Profile guided optimization only supported on Windows.") | 1296 Abort("Profile guided optimization only supported on Windows.") |
1277 if env['cache'] and not os.path.isdir(env['cache']): | 1297 if env['cache'] and not os.path.isdir(env['cache']): |
1278 Abort("The specified cache directory does not exist.") | 1298 Abort("The specified cache directory does not exist.") |
1279 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): | 1299 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): |
1280 print env['arch'] | 1300 print env['arch'] |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 # will not work much longer. Please switch to using # | 1628 # will not work much longer. Please switch to using # |
1609 # the GYP-based build now. Instructions are at # | 1629 # the GYP-based build now. Instructions are at # |
1610 # http://code.google.com/p/v8/wiki/BuildingWithGYP. # | 1630 # http://code.google.com/p/v8/wiki/BuildingWithGYP. # |
1611 ####################################################### | 1631 ####################################################### |
1612 """ | 1632 """ |
1613 | 1633 |
1614 WarnAboutDeprecation() | 1634 WarnAboutDeprecation() |
1615 import atexit | 1635 import atexit |
1616 atexit.register(WarnAboutDeprecation) | 1636 atexit.register(WarnAboutDeprecation) |
1617 Build() | 1637 Build() |
OLD | NEW |