| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 'unalignedaccesses:off' : { | 214 'unalignedaccesses:off' : { |
| 215 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=0'] | 215 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=0'] |
| 216 } | 216 } |
| 217 }, | 217 }, |
| 218 'simulator:arm': { | 218 'simulator:arm': { |
| 219 'CCFLAGS': ['-m32'], | 219 'CCFLAGS': ['-m32'], |
| 220 'LINKFLAGS': ['-m32'], | 220 'LINKFLAGS': ['-m32'], |
| 221 }, | 221 }, |
| 222 'arch:mips': { | 222 'arch:mips': { |
| 223 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], | 223 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 224 'mips_arch_variant:mips32r2': { |
| 225 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] |
| 226 }, |
| 224 'simulator:none': { | 227 'simulator:none': { |
| 225 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'], | 228 'CCFLAGS': ['-EL'], |
| 226 'LDFLAGS': ['-EL'] | 229 'LINKFLAGS': ['-EL'], |
| 230 'mips_arch_variant:mips32r2': { |
| 231 'CCFLAGS': ['-mips32r2', '-Wa,-mips32r2'] |
| 232 }, |
| 233 'mips_arch_variant:mips32r1': { |
| 234 'CCFLAGS': ['-mips32', '-Wa,-mips32'] |
| 235 }, |
| 236 'library:static': { |
| 237 'LINKFLAGS': ['-static', '-static-libgcc'] |
| 238 }, |
| 239 'mipsabi:softfloat': { |
| 240 'CCFLAGS': ['-msoft-float'] |
| 241 }, |
| 242 'mipsabi:hardfloat': { |
| 243 'CCFLAGS': ['-mhard-float'] |
| 244 } |
| 227 } | 245 } |
| 228 }, | 246 }, |
| 229 'simulator:mips': { | 247 'simulator:mips': { |
| 230 'CCFLAGS': ['-m32'], | 248 'CCFLAGS': ['-m32'], |
| 231 'LINKFLAGS': ['-m32'], | 249 'LINKFLAGS': ['-m32'], |
| 250 'mipsabi:softfloat': { |
| 251 'CPPDEFINES': ['__mips_soft_float=1'], |
| 252 } |
| 232 }, | 253 }, |
| 233 'arch:x64': { | 254 'arch:x64': { |
| 234 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], | 255 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], |
| 235 'CCFLAGS': ['-m64'], | 256 'CCFLAGS': ['-m64'], |
| 236 'LINKFLAGS': ['-m64'], | 257 'LINKFLAGS': ['-m64'], |
| 237 }, | 258 }, |
| 238 'gdbjit:on': { | 259 'gdbjit:on': { |
| 239 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] | 260 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE'] |
| 240 } | 261 } |
| 241 }, | 262 }, |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 'LIBS': ['winmm', 'ws2_32'] | 356 'LIBS': ['winmm', 'ws2_32'] |
| 336 }, | 357 }, |
| 337 'arch:arm': { | 358 'arch:arm': { |
| 338 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], | 359 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], |
| 339 # /wd4996 is to silence the warning about sscanf | 360 # /wd4996 is to silence the warning about sscanf |
| 340 # used by the arm simulator. | 361 # used by the arm simulator. |
| 341 'WARNINGFLAGS': ['/wd4996'] | 362 'WARNINGFLAGS': ['/wd4996'] |
| 342 }, | 363 }, |
| 343 'arch:mips': { | 364 'arch:mips': { |
| 344 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], | 365 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 366 'mips_arch_variant:mips32r2': { |
| 367 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] |
| 368 }, |
| 345 }, | 369 }, |
| 346 'disassembler:on': { | 370 'disassembler:on': { |
| 347 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] | 371 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] |
| 348 } | 372 } |
| 349 } | 373 } |
| 350 } | 374 } |
| 351 | 375 |
| 352 | 376 |
| 353 MKSNAPSHOT_EXTRA_FLAGS = { | 377 MKSNAPSHOT_EXTRA_FLAGS = { |
| 354 'gcc': { | 378 'gcc': { |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 'arch:ia32': { | 533 'arch:ia32': { |
| 510 'CCFLAGS': ['-m32'], | 534 'CCFLAGS': ['-m32'], |
| 511 'LINKFLAGS': ['-m32'] | 535 'LINKFLAGS': ['-m32'] |
| 512 }, | 536 }, |
| 513 'arch:x64': { | 537 'arch:x64': { |
| 514 'CCFLAGS': ['-m64'], | 538 'CCFLAGS': ['-m64'], |
| 515 'LINKFLAGS': ['-m64'] | 539 'LINKFLAGS': ['-m64'] |
| 516 }, | 540 }, |
| 517 'arch:mips': { | 541 'arch:mips': { |
| 518 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], | 542 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'], |
| 543 'mips_arch_variant:mips32r2': { |
| 544 'CPPDEFINES': ['_MIPS_ARCH_MIPS32R2'] |
| 545 }, |
| 519 'simulator:none': { | 546 'simulator:none': { |
| 520 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'], | 547 'CCFLAGS': ['-EL'], |
| 521 'LINKFLAGS': ['-EL'], | 548 'LINKFLAGS': ['-EL'], |
| 522 'LDFLAGS': ['-EL'] | 549 'mips_arch_variant:mips32r2': { |
| 550 'CCFLAGS': ['-mips32r2', '-Wa,-mips32r2'] |
| 551 }, |
| 552 'mips_arch_variant:mips32r1': { |
| 553 'CCFLAGS': ['-mips32', '-Wa,-mips32'] |
| 554 }, |
| 555 'library:static': { |
| 556 'LINKFLAGS': ['-static', '-static-libgcc'] |
| 557 }, |
| 558 'mipsabi:softfloat': { |
| 559 'CCFLAGS': ['-msoft-float'] |
| 560 }, |
| 561 'mipsabi:hardfloat': { |
| 562 'CCFLAGS': ['-mhard-float'] |
| 563 } |
| 523 } | 564 } |
| 524 }, | 565 }, |
| 525 'simulator:arm': { | 566 'simulator:arm': { |
| 526 'CCFLAGS': ['-m32'], | 567 'CCFLAGS': ['-m32'], |
| 527 'LINKFLAGS': ['-m32'] | 568 'LINKFLAGS': ['-m32'] |
| 528 }, | 569 }, |
| 529 'simulator:mips': { | 570 'simulator:mips': { |
| 530 'CCFLAGS': ['-m32'], | 571 'CCFLAGS': ['-m32'], |
| 531 'LINKFLAGS': ['-m32'] | 572 'LINKFLAGS': ['-m32'], |
| 573 'mipsabi:softfloat': { |
| 574 'CPPDEFINES': ['__mips_soft_float=1'], |
| 575 } |
| 532 }, | 576 }, |
| 533 'mode:release': { | 577 'mode:release': { |
| 534 'CCFLAGS': ['-O2'] | 578 'CCFLAGS': ['-O2'] |
| 535 }, | 579 }, |
| 536 'mode:debug': { | 580 'mode:debug': { |
| 537 'CCFLAGS': ['-g', '-O0'], | 581 'CCFLAGS': ['-g', '-O0'], |
| 538 'CPPDEFINES': ['DEBUG'] | 582 'CPPDEFINES': ['DEBUG'] |
| 539 }, | 583 }, |
| 540 }, | 584 }, |
| 541 'msvc': { | 585 'msvc': { |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 }, | 846 }, |
| 803 'visibility': { | 847 'visibility': { |
| 804 'values': ['default', 'hidden'], | 848 'values': ['default', 'hidden'], |
| 805 'default': VISIBILITY_GUESS, | 849 'default': VISIBILITY_GUESS, |
| 806 'help': 'shared library symbol visibility (%s)' % VISIBILITY_GUESS | 850 'help': 'shared library symbol visibility (%s)' % VISIBILITY_GUESS |
| 807 }, | 851 }, |
| 808 'pgo': { | 852 'pgo': { |
| 809 'values': ['off', 'instrument', 'optimize'], | 853 'values': ['off', 'instrument', 'optimize'], |
| 810 'default': 'off', | 854 'default': 'off', |
| 811 'help': 'select profile guided optimization variant', | 855 'help': 'select profile guided optimization variant', |
| 856 }, |
| 857 'mipsabi': { |
| 858 'values': ['hardfloat', 'softfloat', 'none'], |
| 859 'default': 'hardfloat', |
| 860 'help': 'generate calling conventiont according to selected mips ABI' |
| 861 }, |
| 862 'mips_arch_variant': { |
| 863 'values': ['mips32r2', 'mips32r1'], |
| 864 'default': 'mips32r2', |
| 865 'help': 'mips variant' |
| 812 } | 866 } |
| 813 } | 867 } |
| 814 | 868 |
| 815 | 869 |
| 816 def GetOptions(): | 870 def GetOptions(): |
| 817 result = Options() | 871 result = Options() |
| 818 result.Add('mode', 'compilation mode (debug, release)', 'release') | 872 result.Add('mode', 'compilation mode (debug, release)', 'release') |
| 819 result.Add('sample', 'build sample (shell, process, lineprocessor)', '') | 873 result.Add('sample', 'build sample (shell, process, lineprocessor)', '') |
| 820 result.Add('cache', 'directory to use for scons build cache', '') | 874 result.Add('cache', 'directory to use for scons build cache', '') |
| 821 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') | 875 result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,..
.)', '') |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 print "Warning: forcing architecture to match simulator (%s)" % options['s
imulator'] | 1052 print "Warning: forcing architecture to match simulator (%s)" % options['s
imulator'] |
| 999 options['arch'] = options['simulator'] | 1053 options['arch'] = options['simulator'] |
| 1000 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'): | 1054 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'): |
| 1001 # Print a warning if profiling is enabled without profiling support | 1055 # Print a warning if profiling is enabled without profiling support |
| 1002 print "Warning: forcing profilingsupport on when prof is on" | 1056 print "Warning: forcing profilingsupport on when prof is on" |
| 1003 options['profilingsupport'] = 'on' | 1057 options['profilingsupport'] = 'on' |
| 1004 if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off': | 1058 if os == 'win32' and options['pgo'] != 'off' and options['msvcltcg'] == 'off': |
| 1005 if 'msvcltcg' in ARGUMENTS: | 1059 if 'msvcltcg' in ARGUMENTS: |
| 1006 print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % opti
ons['pgo'] | 1060 print "Warning: forcing msvcltcg on as it is required for pgo (%s)" % opti
ons['pgo'] |
| 1007 options['msvcltcg'] = 'on' | 1061 options['msvcltcg'] = 'on' |
| 1008 if options['arch'] == 'mips': | 1062 if (options['simulator'] == 'mips' and options['mipsabi'] != 'softfloat'): |
| 1009 if ('regexp' in ARGUMENTS) and options['regexp'] == 'native': | 1063 # Print a warning if soft-float ABI is not selected for mips simulator |
| 1010 # Print a warning if native regexp is specified for mips | 1064 print "Warning: forcing soft-float mips ABI when running on simulator" |
| 1011 print "Warning: forcing regexp to interpreted for mips" | 1065 options['mipsabi'] = 'softfloat' |
| 1012 options['regexp'] = 'interpreted' | 1066 if (options['mipsabi'] != 'none') and (options['arch'] != 'mips') and (optio
ns['simulator'] != 'mips'): |
| 1067 options['mipsabi'] = 'none' |
| 1013 if options['liveobjectlist'] == 'on': | 1068 if options['liveobjectlist'] == 'on': |
| 1014 if (options['debuggersupport'] != 'on') or (options['mode'] == 'release'): | 1069 if (options['debuggersupport'] != 'on') or (options['mode'] == 'release'): |
| 1015 # Print a warning that liveobjectlist will implicitly enable the debugger | 1070 # Print a warning that liveobjectlist will implicitly enable the debugger |
| 1016 print "Warning: forcing debuggersupport on for liveobjectlist" | 1071 print "Warning: forcing debuggersupport on for liveobjectlist" |
| 1017 options['debuggersupport'] = 'on' | 1072 options['debuggersupport'] = 'on' |
| 1018 options['inspector'] = 'on' | 1073 options['inspector'] = 'on' |
| 1019 options['objectprint'] = 'on' | 1074 options['objectprint'] = 'on' |
| 1020 | 1075 |
| 1021 | 1076 |
| 1022 def ParseEnvOverrides(arg, imports): | 1077 def ParseEnvOverrides(arg, imports): |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1184 # version of scons. Also, there's a bug in some revisions that | 1239 # version of scons. Also, there's a bug in some revisions that |
| 1185 # doesn't allow this flag to be set, so we swallow any exceptions. | 1240 # doesn't allow this flag to be set, so we swallow any exceptions. |
| 1186 # Lovely. | 1241 # Lovely. |
| 1187 try: | 1242 try: |
| 1188 SetOption('warn', 'no-deprecated') | 1243 SetOption('warn', 'no-deprecated') |
| 1189 except: | 1244 except: |
| 1190 pass | 1245 pass |
| 1191 | 1246 |
| 1192 | 1247 |
| 1193 Build() | 1248 Build() |
| OLD | NEW |