| OLD | NEW |
| 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 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 LIBRARY_FLAGS = { | 54 LIBRARY_FLAGS = { |
| 55 'all': { | 55 'all': { |
| 56 'CPPPATH': [join(root_dir, 'src')], | 56 'CPPPATH': [join(root_dir, 'src')], |
| 57 'regexp:interpreted': { | 57 'regexp:interpreted': { |
| 58 'CPPDEFINES': ['V8_INTERPRETED_REGEXP'] | 58 'CPPDEFINES': ['V8_INTERPRETED_REGEXP'] |
| 59 }, | 59 }, |
| 60 'mode:debug': { | 60 'mode:debug': { |
| 61 'CPPDEFINES': ['V8_ENABLE_CHECKS', 'OBJECT_PRINT'] | 61 'CPPDEFINES': ['V8_ENABLE_CHECKS', 'OBJECT_PRINT'] |
| 62 }, | 62 }, |
| 63 'vmstate:on': { | |
| 64 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING'], | |
| 65 }, | |
| 66 'objectprint:on': { | 63 'objectprint:on': { |
| 67 'CPPDEFINES': ['OBJECT_PRINT'], | 64 'CPPDEFINES': ['OBJECT_PRINT'], |
| 68 }, | 65 }, |
| 69 'protectheap:on': { | |
| 70 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_HEAP_PROTECTION'], | |
| 71 }, | |
| 72 'profilingsupport:on': { | |
| 73 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_LOGGING_AND_PROFILING'
], | |
| 74 }, | |
| 75 'debuggersupport:on': { | 66 'debuggersupport:on': { |
| 76 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'], | 67 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'], |
| 77 }, | 68 }, |
| 78 'inspector:on': { | 69 'inspector:on': { |
| 79 'CPPDEFINES': ['INSPECTOR'], | 70 'CPPDEFINES': ['INSPECTOR'], |
| 80 }, | 71 }, |
| 81 'fasttls:on': { | 72 'fasttls:off': { |
| 82 'CPPDEFINES': ['V8_FAST_TLS'], | 73 'CPPDEFINES': ['V8_NO_FAST_TLS'], |
| 83 }, | 74 }, |
| 84 'liveobjectlist:on': { | 75 'liveobjectlist:on': { |
| 85 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT', 'INSPECTOR', | 76 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT', 'INSPECTOR', |
| 86 'LIVE_OBJECT_LIST', 'OBJECT_PRINT'], | 77 'LIVE_OBJECT_LIST', 'OBJECT_PRINT'], |
| 87 } | 78 } |
| 88 }, | 79 }, |
| 89 'gcc': { | 80 'gcc': { |
| 90 'all': { | 81 'all': { |
| 91 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 82 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 92 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], | 83 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 }, | 397 }, |
| 407 'gcc': { | 398 'gcc': { |
| 408 'all': { | 399 'all': { |
| 409 'LIBPATH': [abspath('.')], | 400 'LIBPATH': [abspath('.')], |
| 410 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 401 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 411 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], | 402 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], |
| 412 'LINKFLAGS': ['$CCFLAGS'], | 403 'LINKFLAGS': ['$CCFLAGS'], |
| 413 }, | 404 }, |
| 414 'os:linux': { | 405 'os:linux': { |
| 415 'LIBS': ['pthread'], | 406 'LIBS': ['pthread'], |
| 407 'CCFLAGS': ['-Wno-unused-but-set-variable'], |
| 416 }, | 408 }, |
| 417 'os:macos': { | 409 'os:macos': { |
| 418 'LIBS': ['pthread'], | 410 'LIBS': ['pthread'], |
| 419 }, | 411 }, |
| 420 'os:freebsd': { | 412 'os:freebsd': { |
| 421 'LIBS': ['execinfo', 'pthread'] | 413 'LIBS': ['execinfo', 'pthread'] |
| 422 }, | 414 }, |
| 423 'os:solaris': { | 415 'os:solaris': { |
| 424 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], | 416 'LIBS': ['m', 'pthread', 'socket', 'nsl', 'rt'], |
| 425 'LINKFLAGS': ['-mt'] | 417 'LINKFLAGS': ['-mt'] |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 }, | 767 }, |
| 776 'msvcrt:shared': { | 768 'msvcrt:shared': { |
| 777 'CCFLAGS': ['/MDd'] | 769 'CCFLAGS': ['/MDd'] |
| 778 } | 770 } |
| 779 } | 771 } |
| 780 } | 772 } |
| 781 } | 773 } |
| 782 | 774 |
| 783 | 775 |
| 784 D8_FLAGS = { | 776 D8_FLAGS = { |
| 777 'all': { |
| 778 'library:shared': { |
| 779 'CPPDEFINES': ['V8_SHARED'], |
| 780 'LIBS': ['v8'], |
| 781 'LIBPATH': ['.'] |
| 782 }, |
| 783 }, |
| 785 'gcc': { | 784 'gcc': { |
| 786 'all': { | 785 'all': { |
| 787 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], | 786 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], |
| 788 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], | 787 'CXXFLAGS': ['-fno-rtti', '-fno-exceptions'], |
| 789 'LINKFLAGS': ['$CCFLAGS'], | 788 'LINKFLAGS': ['$CCFLAGS'], |
| 790 }, | 789 }, |
| 791 'console:readline': { | 790 'console:readline': { |
| 792 'LIBS': ['readline'] | 791 'LIBS': ['readline'] |
| 793 }, | 792 }, |
| 794 'os:linux': { | 793 'os:linux': { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 'gdbjit': { | 921 'gdbjit': { |
| 923 'values': ['on', 'off'], | 922 'values': ['on', 'off'], |
| 924 'default': 'off', | 923 'default': 'off', |
| 925 'help': 'enable GDB JIT interface' | 924 'help': 'enable GDB JIT interface' |
| 926 }, | 925 }, |
| 927 'library': { | 926 'library': { |
| 928 'values': ['static', 'shared'], | 927 'values': ['static', 'shared'], |
| 929 'default': 'static', | 928 'default': 'static', |
| 930 'help': 'the type of library to produce' | 929 'help': 'the type of library to produce' |
| 931 }, | 930 }, |
| 932 'vmstate': { | |
| 933 'values': ['on', 'off'], | |
| 934 'default': 'off', | |
| 935 'help': 'enable VM state tracking' | |
| 936 }, | |
| 937 'objectprint': { | 931 'objectprint': { |
| 938 'values': ['on', 'off'], | 932 'values': ['on', 'off'], |
| 939 'default': 'off', | 933 'default': 'off', |
| 940 'help': 'enable object printing' | 934 'help': 'enable object printing' |
| 941 }, | 935 }, |
| 942 'protectheap': { | |
| 943 'values': ['on', 'off'], | |
| 944 'default': 'off', | |
| 945 'help': 'enable heap protection' | |
| 946 }, | |
| 947 'profilingsupport': { | 936 'profilingsupport': { |
| 948 'values': ['on', 'off'], | 937 'values': ['on', 'off'], |
| 949 'default': 'on', | 938 'default': 'on', |
| 950 'help': 'enable profiling of JavaScript code' | 939 'help': 'enable profiling of JavaScript code' |
| 951 }, | 940 }, |
| 952 'debuggersupport': { | 941 'debuggersupport': { |
| 953 'values': ['on', 'off'], | 942 'values': ['on', 'off'], |
| 954 'default': 'on', | 943 'default': 'on', |
| 955 'help': 'enable debugging of JavaScript code' | 944 'help': 'enable debugging of JavaScript code' |
| 956 }, | 945 }, |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1382 preparser_library = env.SharedLibrary(preparser_library_name, | 1371 preparser_library = env.SharedLibrary(preparser_library_name, |
| 1383 preparser_files, | 1372 preparser_files, |
| 1384 PDB=preparser_pdb_name, | 1373 PDB=preparser_pdb_name, |
| 1385 SONAME=preparser_soname) | 1374 SONAME=preparser_soname) |
| 1386 context.library_targets.append(library) | 1375 context.library_targets.append(library) |
| 1387 context.library_targets.append(preparser_library) | 1376 context.library_targets.append(preparser_library) |
| 1388 | 1377 |
| 1389 d8_env = Environment(tools=tools) | 1378 d8_env = Environment(tools=tools) |
| 1390 d8_env.Replace(**context.flags['d8']) | 1379 d8_env.Replace(**context.flags['d8']) |
| 1391 context.ApplyEnvOverrides(d8_env) | 1380 context.ApplyEnvOverrides(d8_env) |
| 1392 shell = d8_env.Program('d8' + suffix, object_files + shell_files) | 1381 if context.options['library'] == 'static': |
| 1382 shell = d8_env.Program('d8' + suffix, object_files + shell_files) |
| 1383 else: |
| 1384 shell = d8_env.Program('d8' + suffix, shell_files) |
| 1385 d8_env.Depends(shell, library) |
| 1393 context.d8_targets.append(shell) | 1386 context.d8_targets.append(shell) |
| 1394 | 1387 |
| 1395 for sample in context.samples: | 1388 for sample in context.samples: |
| 1396 sample_env = Environment(tools=tools) | 1389 sample_env = Environment(tools=tools) |
| 1397 sample_env.Replace(**context.flags['sample']) | 1390 sample_env.Replace(**context.flags['sample']) |
| 1398 sample_env.Prepend(LIBS=[library_name]) | 1391 sample_env.Prepend(LIBS=[library_name]) |
| 1399 context.ApplyEnvOverrides(sample_env) | 1392 context.ApplyEnvOverrides(sample_env) |
| 1400 sample_object = sample_env.SConscript( | 1393 sample_object = sample_env.SConscript( |
| 1401 join('samples', 'SConscript'), | 1394 join('samples', 'SConscript'), |
| 1402 build_dir=join('obj', 'sample', sample, target_id), | 1395 build_dir=join('obj', 'sample', sample, target_id), |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1483 # version of scons. Also, there's a bug in some revisions that | 1476 # version of scons. Also, there's a bug in some revisions that |
| 1484 # doesn't allow this flag to be set, so we swallow any exceptions. | 1477 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 1485 # Lovely. | 1478 # Lovely. |
| 1486 try: | 1479 try: |
| 1487 SetOption('warn', 'no-deprecated') | 1480 SetOption('warn', 'no-deprecated') |
| 1488 except: | 1481 except: |
| 1489 pass | 1482 pass |
| 1490 | 1483 |
| 1491 | 1484 |
| 1492 Build() | 1485 Build() |
| OLD | NEW |