OLD | NEW |
1 # Copyright 2010 the V8 project authors. All rights reserved. | 1 # Copyright 2010 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 'CPPDEFINES': ['__mips_soft_float=1'], | 206 'CPPDEFINES': ['__mips_soft_float=1'], |
207 } | 207 } |
208 }, | 208 }, |
209 'arch:x64': { | 209 'arch:x64': { |
210 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 210 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
211 'CCFLAGS': ['-m64'], | 211 'CCFLAGS': ['-m64'], |
212 'LINKFLAGS': ['-m64'], | 212 'LINKFLAGS': ['-m64'], |
213 }, | 213 }, |
214 'gdbjit:on': { | 214 'gdbjit:on': { |
215 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] | 215 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] |
| 216 }, |
| 217 'compress_startup_data:bz2': { |
| 218 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'] |
216 } | 219 } |
217 }, | 220 }, |
218 'msvc': { | 221 'msvc': { |
219 'all': { | 222 'all': { |
220 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 223 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
221 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 224 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
222 'CPPDEFINES': ['WIN32'], | 225 'CPPDEFINES': ['WIN32'], |
223 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], | 226 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], |
224 'CCPDBFLAGS': ['/Zi'] | 227 'CCPDBFLAGS': ['/Zi'] |
225 }, | 228 }, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 'os:solaris': { | 351 'os:solaris': { |
349 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], | 352 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], |
350 'LINKFLAGS': ['-mt'] | 353 'LINKFLAGS': ['-mt'] |
351 }, | 354 }, |
352 'os:openbsd': { | 355 'os:openbsd': { |
353 'LIBS': ['execinfo', 'pthread'] | 356 'LIBS': ['execinfo', 'pthread'] |
354 }, | 357 }, |
355 'os:win32': { | 358 'os:win32': { |
356 'LIBS': ['winmm', 'ws2_32'], | 359 'LIBS': ['winmm', 'ws2_32'], |
357 }, | 360 }, |
| 361 'compress_startup_data:bz2': { |
| 362 'os:linux': { |
| 363 'LIBS': ['bz2'] |
| 364 } |
| 365 }, |
358 }, | 366 }, |
359 'msvc': { | 367 'msvc': { |
360 'all': { | 368 'all': { |
361 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], | 369 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], |
362 'LIBS': ['winmm', 'ws2_32'] | 370 'LIBS': ['winmm', 'ws2_32'] |
363 } | 371 } |
364 } | 372 } |
365 } | 373 } |
366 | 374 |
367 | 375 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 'CCFLAGS': ['-m32'], | 513 'CCFLAGS': ['-m32'], |
506 'LINKFLAGS': ['-m32'] | 514 'LINKFLAGS': ['-m32'] |
507 }, | 515 }, |
508 'mode:release': { | 516 'mode:release': { |
509 'CCFLAGS': ['-O2'] | 517 'CCFLAGS': ['-O2'] |
510 }, | 518 }, |
511 'mode:debug': { | 519 'mode:debug': { |
512 'CCFLAGS': ['-g', '-O0'], | 520 'CCFLAGS': ['-g', '-O0'], |
513 'CPPDEFINES': ['DEBUG'] | 521 'CPPDEFINES': ['DEBUG'] |
514 }, | 522 }, |
| 523 'compress_startup_data:bz2': { |
| 524 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'], |
| 525 'os:linux': { |
| 526 'LIBS': ['bz2'] |
| 527 } |
| 528 }, |
515 }, | 529 }, |
516 'msvc': { | 530 'msvc': { |
517 'all': { | 531 'all': { |
518 'LIBS': ['winmm', 'ws2_32'] | 532 'LIBS': ['winmm', 'ws2_32'] |
519 }, | 533 }, |
520 'verbose:off': { | 534 'verbose:off': { |
521 'CCFLAGS': ['/nologo'], | 535 'CCFLAGS': ['/nologo'], |
522 'LINKFLAGS': ['/NOLOGO'] | 536 'LINKFLAGS': ['/NOLOGO'] |
523 }, | 537 }, |
524 'verbose:on': { | 538 'verbose:on': { |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 }, | 982 }, |
969 'mipsabi': { | 983 'mipsabi': { |
970 'values': ['hardfloat', 'softfloat', 'none'], | 984 'values': ['hardfloat', 'softfloat', 'none'], |
971 'default': 'hardfloat', | 985 'default': 'hardfloat', |
972 'help': 'generate calling conventiont according to selected mips ABI' | 986 'help': 'generate calling conventiont according to selected mips ABI' |
973 }, | 987 }, |
974 'mips_arch_variant': { | 988 'mips_arch_variant': { |
975 'values': ['mips32r2', 'mips32r1'], | 989 'values': ['mips32r2', 'mips32r1'], |
976 'default': 'mips32r2', | 990 'default': 'mips32r2', |
977 'help': 'mips variant' | 991 'help': 'mips variant' |
978 } | 992 }, |
| 993 'compress_startup_data': { |
| 994 'values': ['off', 'bz2'], |
| 995 'default': 'off', |
| 996 'help': 'compress startup data (snapshot) [Linux only]' |
| 997 }, |
979 } | 998 } |
980 | 999 |
981 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) | 1000 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) |
982 | 1001 |
983 | 1002 |
984 def AddOptions(options, result): | 1003 def AddOptions(options, result): |
985 guess_env = Environment(options=result) | 1004 guess_env = Environment(options=result) |
986 for (name, option) in options.iteritems(): | 1005 for (name, option) in options.iteritems(): |
987 if 'guess' in option: | 1006 if 'guess' in option: |
988 # Option has a guess function | 1007 # Option has a guess function |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 if env['soname'] == 'on' and env['library'] == 'static': | 1110 if env['soname'] == 'on' and env['library'] == 'static': |
1092 Abort("Shared Object soname not applicable for static library.") | 1111 Abort("Shared Object soname not applicable for static library.") |
1093 if env['os'] != 'win32' and env['pgo'] != 'off': | 1112 if env['os'] != 'win32' and env['pgo'] != 'off': |
1094 Abort("Profile guided optimization only supported on Windows.") | 1113 Abort("Profile guided optimization only supported on Windows.") |
1095 if env['cache'] and not os.path.isdir(env['cache']): | 1114 if env['cache'] and not os.path.isdir(env['cache']): |
1096 Abort("The specified cache directory does not exist.") | 1115 Abort("The specified cache directory does not exist.") |
1097 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): | 1116 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce
sses' in ARGUMENTS): |
1098 print env['arch'] | 1117 print env['arch'] |
1099 print env['simulator'] | 1118 print env['simulator'] |
1100 Abort("Option unalignedaccesses only supported for the ARM architecture.") | 1119 Abort("Option unalignedaccesses only supported for the ARM architecture.") |
| 1120 if env['os'] != 'linux' and env['compress_startup_data'] != 'off': |
| 1121 Abort("Startup data compression is only available on Linux") |
1101 for (name, option) in ALL_OPTIONS.iteritems(): | 1122 for (name, option) in ALL_OPTIONS.iteritems(): |
1102 if (not name in env): | 1123 if (not name in env): |
1103 message = ("A value for option %s must be specified (%s)." % | 1124 message = ("A value for option %s must be specified (%s)." % |
1104 (name, ", ".join(option['values']))) | 1125 (name, ", ".join(option['values']))) |
1105 Abort(message) | 1126 Abort(message) |
1106 if not env[name] in option['values']: | 1127 if not env[name] in option['values']: |
1107 message = ("Unknown %s value '%s'. Possible values are (%s)." % | 1128 message = ("Unknown %s value '%s'. Possible values are (%s)." % |
1108 (name, env[name], ", ".join(option['values']))) | 1129 (name, env[name], ", ".join(option['values']))) |
1109 Abort(message) | 1130 Abort(message) |
1110 | 1131 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 # version of scons. Also, there's a bug in some revisions that | 1430 # version of scons. Also, there's a bug in some revisions that |
1410 # doesn't allow this flag to be set, so we swallow any exceptions. | 1431 # doesn't allow this flag to be set, so we swallow any exceptions. |
1411 # Lovely. | 1432 # Lovely. |
1412 try: | 1433 try: |
1413 SetOption('warn', 'no-deprecated') | 1434 SetOption('warn', 'no-deprecated') |
1414 except: | 1435 except: |
1415 pass | 1436 pass |
1416 | 1437 |
1417 | 1438 |
1418 Build() | 1439 Build() |
OLD | NEW |