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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
194 'CPPDEFINES': ['__mips_soft_float=1'], | 194 'CPPDEFINES': ['__mips_soft_float=1'], |
195 } | 195 } |
196 }, | 196 }, |
197 'arch:x64': { | 197 'arch:x64': { |
198 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 198 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
199 'CCFLAGS': ['-m64'], | 199 'CCFLAGS': ['-m64'], |
200 'LINKFLAGS': ['-m64'], | 200 'LINKFLAGS': ['-m64'], |
201 }, | 201 }, |
202 'gdbjit:on': { | 202 'gdbjit:on': { |
203 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] | 203 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] |
204 }, | |
205 'compress_startup_data:bz2': { | |
206 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'] | |
204 } | 207 } |
205 }, | 208 }, |
206 'msvc': { | 209 'msvc': { |
207 'all': { | 210 'all': { |
208 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 211 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
209 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], | 212 'CXXFLAGS': ['$CCFLAGS', '/GR-', '/Gy'], |
210 'CPPDEFINES': ['WIN32'], | 213 'CPPDEFINES': ['WIN32'], |
211 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], | 214 'LINKFLAGS': ['/INCREMENTAL:NO', '/NXCOMPAT', '/IGNORE:4221'], |
212 'CCPDBFLAGS': ['/Zi'] | 215 'CCPDBFLAGS': ['/Zi'] |
213 }, | 216 }, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 }, | 333 }, |
331 'os:solaris': { | 334 'os:solaris': { |
332 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], | 335 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], |
333 'LINKFLAGS': ['-mt'] | 336 'LINKFLAGS': ['-mt'] |
334 }, | 337 }, |
335 'os:openbsd': { | 338 'os:openbsd': { |
336 'LIBS': ['execinfo', 'pthread'] | 339 'LIBS': ['execinfo', 'pthread'] |
337 }, | 340 }, |
338 'os:win32': { | 341 'os:win32': { |
339 'LIBS': ['winmm', 'ws2_32'], | 342 'LIBS': ['winmm', 'ws2_32'], |
340 }, | 343 }, |
Søren Thygesen Gjesse
2011/04/29 06:50:29
As this is Linux only I think this should be eithe
mnaganov (inactive)
2011/04/29 12:07:58
Done.
| |
344 'compress_startup_data:bz2': { | |
345 'LIBS': ['bz2'] | |
346 }, | |
341 }, | 347 }, |
342 'msvc': { | 348 'msvc': { |
343 'all': { | 349 'all': { |
344 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], | 350 'CPPDEFINES': ['_HAS_EXCEPTIONS=0'], |
345 'LIBS': ['winmm', 'ws2_32'] | 351 'LIBS': ['winmm', 'ws2_32'] |
346 } | 352 } |
347 } | 353 } |
348 } | 354 } |
349 | 355 |
350 | 356 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 'CCFLAGS': ['-m32'], | 477 'CCFLAGS': ['-m32'], |
472 'LINKFLAGS': ['-m32'] | 478 'LINKFLAGS': ['-m32'] |
473 }, | 479 }, |
474 'mode:release': { | 480 'mode:release': { |
475 'CCFLAGS': ['-O2'] | 481 'CCFLAGS': ['-O2'] |
476 }, | 482 }, |
477 'mode:debug': { | 483 'mode:debug': { |
478 'CCFLAGS': ['-g', '-O0'], | 484 'CCFLAGS': ['-g', '-O0'], |
479 'CPPDEFINES': ['DEBUG'] | 485 'CPPDEFINES': ['DEBUG'] |
480 }, | 486 }, |
487 'compress_startup_data:bz2': { | |
488 'CPPDEFINES': ['COMPRESS_STARTUP_DATA_BZ2'], | |
Søren Thygesen Gjesse
2011/04/29 06:50:29
Ditto for the LIBS part.
mnaganov (inactive)
2011/04/29 12:07:58
Done.
| |
489 'LIBS': ['bz2'] | |
490 }, | |
481 }, | 491 }, |
482 'msvc': { | 492 'msvc': { |
483 'all': { | 493 'all': { |
484 'LIBS': ['winmm', 'ws2_32'] | 494 'LIBS': ['winmm', 'ws2_32'] |
485 }, | 495 }, |
486 'verbose:off': { | 496 'verbose:off': { |
487 'CCFLAGS': ['/nologo'], | 497 'CCFLAGS': ['/nologo'], |
488 'LINKFLAGS': ['/NOLOGO'] | 498 'LINKFLAGS': ['/NOLOGO'] |
489 }, | 499 }, |
490 'verbose:on': { | 500 'verbose:on': { |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
912 }, | 922 }, |
913 'mipsabi': { | 923 'mipsabi': { |
914 'values': ['hardfloat', 'softfloat', 'none'], | 924 'values': ['hardfloat', 'softfloat', 'none'], |
915 'default': 'hardfloat', | 925 'default': 'hardfloat', |
916 'help': 'generate calling conventiont according to selected mips ABI' | 926 'help': 'generate calling conventiont according to selected mips ABI' |
917 }, | 927 }, |
918 'mips_arch_variant': { | 928 'mips_arch_variant': { |
919 'values': ['mips32r2', 'mips32r1'], | 929 'values': ['mips32r2', 'mips32r1'], |
920 'default': 'mips32r2', | 930 'default': 'mips32r2', |
921 'help': 'mips variant' | 931 'help': 'mips variant' |
922 } | 932 }, |
933 'compress_startup_data': { | |
934 'values': ['off', 'bz2'], | |
935 'default': 'off', | |
936 'help': 'compress startup data (snapshot) [Linux only]' | |
937 }, | |
923 } | 938 } |
924 | 939 |
925 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) | 940 ALL_OPTIONS = dict(PLATFORM_OPTIONS, **SIMPLE_OPTIONS) |
926 | 941 |
927 | 942 |
928 def AddOptions(options, result): | 943 def AddOptions(options, result): |
929 guess_env = Environment(options=result) | 944 guess_env = Environment(options=result) |
930 for (name, option) in options.iteritems(): | 945 for (name, option) in options.iteritems(): |
931 if 'guess' in option: | 946 if 'guess' in option: |
932 # Option has a guess function | 947 # Option has a guess function |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1035 if env['soname'] == 'on' and env['library'] == 'static': | 1050 if env['soname'] == 'on' and env['library'] == 'static': |
1036 Abort("Shared Object soname not applicable for static library.") | 1051 Abort("Shared Object soname not applicable for static library.") |
1037 if env['os'] != 'win32' and env['pgo'] != 'off': | 1052 if env['os'] != 'win32' and env['pgo'] != 'off': |
1038 Abort("Profile guided optimization only supported on Windows.") | 1053 Abort("Profile guided optimization only supported on Windows.") |
1039 if env['cache'] and not os.path.isdir(env['cache']): | 1054 if env['cache'] and not os.path.isdir(env['cache']): |
1040 Abort("The specified cache directory does not exist.") | 1055 Abort("The specified cache directory does not exist.") |
1041 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS): | 1056 if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedacce sses' in ARGUMENTS): |
1042 print env['arch'] | 1057 print env['arch'] |
1043 print env['simulator'] | 1058 print env['simulator'] |
1044 Abort("Option unalignedaccesses only supported for the ARM architecture.") | 1059 Abort("Option unalignedaccesses only supported for the ARM architecture.") |
1060 if env['os'] != 'linux' and env['compress_startup_data'] != 'off': | |
1061 Abort("Startup data compression is only available on Linux") | |
1045 for (name, option) in ALL_OPTIONS.iteritems(): | 1062 for (name, option) in ALL_OPTIONS.iteritems(): |
1046 if (not name in env): | 1063 if (not name in env): |
1047 message = ("A value for option %s must be specified (%s)." % | 1064 message = ("A value for option %s must be specified (%s)." % |
1048 (name, ", ".join(option['values']))) | 1065 (name, ", ".join(option['values']))) |
1049 Abort(message) | 1066 Abort(message) |
1050 if not env[name] in option['values']: | 1067 if not env[name] in option['values']: |
1051 message = ("Unknown %s value '%s'. Possible values are (%s)." % | 1068 message = ("Unknown %s value '%s'. Possible values are (%s)." % |
1052 (name, env[name], ", ".join(option['values']))) | 1069 (name, env[name], ", ".join(option['values']))) |
1053 Abort(message) | 1070 Abort(message) |
1054 | 1071 |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1353 # version of scons. Also, there's a bug in some revisions that | 1370 # version of scons. Also, there's a bug in some revisions that |
1354 # doesn't allow this flag to be set, so we swallow any exceptions. | 1371 # doesn't allow this flag to be set, so we swallow any exceptions. |
1355 # Lovely. | 1372 # Lovely. |
1356 try: | 1373 try: |
1357 SetOption('warn', 'no-deprecated') | 1374 SetOption('warn', 'no-deprecated') |
1358 except: | 1375 except: |
1359 pass | 1376 pass |
1360 | 1377 |
1361 | 1378 |
1362 Build() | 1379 Build() |
OLD | NEW |