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