Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: SConstruct

Issue 549079: Support for MIPS in architecture independent files.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/SConscript » ('j') | src/allocation.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2008 the V8 project authors. All rights reserved. 1 # Copyright 2008 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 'CCFLAGS': ['-m32'], 166 'CCFLAGS': ['-m32'],
167 'LINKFLAGS': ['-m32'] 167 'LINKFLAGS': ['-m32']
168 }, 168 },
169 'arch:arm': { 169 'arch:arm': {
170 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'] 170 'CPPDEFINES': ['V8_TARGET_ARCH_ARM']
171 }, 171 },
172 'simulator:arm': { 172 'simulator:arm': {
173 'CCFLAGS': ['-m32'], 173 'CCFLAGS': ['-m32'],
174 'LINKFLAGS': ['-m32'] 174 'LINKFLAGS': ['-m32']
175 }, 175 },
176 'arch:mips': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 If you change this section to 'CPPDEFINES':
Alexandre 2010/01/22 23:08:42 Applied this change. On 2010/01/20 15:30:28, Søren
177 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
178 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'],
179 'LDFLAGS': ['-EL']
180 },
181 'simulator:mips': {
182 'CCFLAGS': ['-m32'],
183 'LINKFLAGS': ['-m32']
184 },
185 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
186 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
187 'CCFLAGS': [],
188 },
176 'arch:x64': { 189 'arch:x64': {
177 'CPPDEFINES': ['V8_TARGET_ARCH_X64'], 190 'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
178 'CCFLAGS': ['-m64'], 191 'CCFLAGS': ['-m64'],
179 'LINKFLAGS': ['-m64'], 192 'LINKFLAGS': ['-m64'],
180 }, 193 },
181 'prof:oprofile': { 194 'prof:oprofile': {
182 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'] 195 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
183 } 196 }
184 }, 197 },
185 'msvc': { 198 'msvc': {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 }, 287 },
275 'arch:x64': { 288 'arch:x64': {
276 'WARNINGFLAGS': ['/W2'] 289 'WARNINGFLAGS': ['/W2']
277 }, 290 },
278 'arch:arm': { 291 'arch:arm': {
279 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], 292 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'],
280 # /wd4996 is to silence the warning about sscanf 293 # /wd4996 is to silence the warning about sscanf
281 # used by the arm simulator. 294 # used by the arm simulator.
282 'WARNINGFLAGS': ['/wd4996'] 295 'WARNINGFLAGS': ['/wd4996']
283 }, 296 },
297 'arch:mips': {
298 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
299 },
300 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
301 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
Søren Thygesen Gjesse 2010/01/20 15:30:28 There is no active use of defines NO_NATIVES and M
Alexandre 2010/01/22 23:08:42 Removed On 2010/01/20 15:30:28, Søren Gjesse wrote
302 },
284 'disassembler:on': { 303 'disassembler:on': {
285 'CPPDEFINES': ['ENABLE_DISASSEMBLER'] 304 'CPPDEFINES': ['ENABLE_DISASSEMBLER']
286 } 305 }
287 } 306 }
288 } 307 }
289 308
290 309
291 MKSNAPSHOT_EXTRA_FLAGS = { 310 MKSNAPSHOT_EXTRA_FLAGS = {
292 'gcc': { 311 'gcc': {
293 'os:linux': { 312 'os:linux': {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 } 435 }
417 }, 436 },
418 'arch:ia32': { 437 'arch:ia32': {
419 'CCFLAGS': ['-m32'], 438 'CCFLAGS': ['-m32'],
420 'LINKFLAGS': ['-m32'] 439 'LINKFLAGS': ['-m32']
421 }, 440 },
422 'arch:x64': { 441 'arch:x64': {
423 'CCFLAGS': ['-m64'], 442 'CCFLAGS': ['-m64'],
424 'LINKFLAGS': ['-m64'] 443 'LINKFLAGS': ['-m64']
425 }, 444 },
445 'arch:mips': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 Change this section like this: 'CPPDEFINES'
Alexandre 2010/01/22 23:08:42 Applied the changes. On 2010/01/20 15:30:28, Søren
446 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS'],
447 'CCFLAGS': ['-EL', '-mips32r2', '-Wa,-mips32r2', '-fno-inline'],
448 'LINKFLAGS': ['-EL'],
449 'LDFLAGS': ['-EL']
450 },
451 'arch:mips-simu': {
Søren Thygesen Gjesse 2010/01/20 15:30:28 With the change to arch:mips above the pseudo arch
Alexandre 2010/01/22 23:08:42 mips-simu arch removed On 2010/01/20 15:30:28, Sør
452 'CPPDEFINES': ['V8_TARGET_ARCH_MIPS', 'NO_NATIVES', 'MIPS_SIMU'],
453 'CCFLAGS': [],
454 },
426 'simulator:arm': { 455 'simulator:arm': {
427 'CCFLAGS': ['-m32'], 456 'CCFLAGS': ['-m32'],
428 'LINKFLAGS': ['-m32'] 457 'LINKFLAGS': ['-m32']
429 }, 458 },
459 'simulator:mips': {
460 'CCFLAGS': ['-m32'],
461 'LINKFLAGS': ['-m32']
462 },
430 'mode:release': { 463 'mode:release': {
431 'CCFLAGS': ['-O2'] 464 'CCFLAGS': ['-O2']
432 }, 465 },
433 'mode:debug': { 466 'mode:debug': {
434 'CCFLAGS': ['-g', '-O0'] 467 'CCFLAGS': ['-g', '-O0']
435 }, 468 },
436 'prof:oprofile': { 469 'prof:oprofile': {
437 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'], 470 'LIBPATH': ['/usr/lib32', '/usr/lib32/oprofile'],
438 'LIBS': ['opagent'] 471 'LIBS': ['opagent']
439 } 472 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 'values': ['gcc', 'msvc'], 586 'values': ['gcc', 'msvc'],
554 'default': TOOLCHAIN_GUESS, 587 'default': TOOLCHAIN_GUESS,
555 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')' 588 'help': 'the toolchain to use (' + TOOLCHAIN_GUESS + ')'
556 }, 589 },
557 'os': { 590 'os': {
558 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'], 591 'values': ['freebsd', 'linux', 'macos', 'win32', 'android'],
559 'default': OS_GUESS, 592 'default': OS_GUESS,
560 'help': 'the os to build for (' + OS_GUESS + ')' 593 'help': 'the os to build for (' + OS_GUESS + ')'
561 }, 594 },
562 'arch': { 595 'arch': {
563 'values':['arm', 'ia32', 'x64'], 596 'values':['arm', 'ia32', 'x64', 'mips'],
564 'default': ARCH_GUESS, 597 'default': ARCH_GUESS,
565 'help': 'the architecture to build for (' + ARCH_GUESS + ')' 598 'help': 'the architecture to build for (' + ARCH_GUESS + ')'
566 }, 599 },
567 'regexp': { 600 'regexp': {
568 'values': ['native', 'interpreted'], 601 'values': ['native', 'interpreted'],
569 'default': 'native', 602 'default': 'native',
570 'help': 'Whether to use native or interpreted regexp implementation' 603 'help': 'Whether to use native or interpreted regexp implementation'
571 }, 604 },
572 'snapshot': { 605 'snapshot': {
573 'values': ['on', 'off', 'nobuild'], 606 'values': ['on', 'off', 'nobuild'],
(...skipping 29 matching lines...) Expand all
603 'values': ['static', 'shared'], 636 'values': ['static', 'shared'],
604 'default': 'static', 637 'default': 'static',
605 'help': 'the type of Microsoft Visual C++ runtime library to use' 638 'help': 'the type of Microsoft Visual C++ runtime library to use'
606 }, 639 },
607 'msvcltcg': { 640 'msvcltcg': {
608 'values': ['on', 'off'], 641 'values': ['on', 'off'],
609 'default': 'on', 642 'default': 'on',
610 'help': 'use Microsoft Visual C++ link-time code generation' 643 'help': 'use Microsoft Visual C++ link-time code generation'
611 }, 644 },
612 'simulator': { 645 'simulator': {
613 'values': ['arm', 'none'], 646 'values': ['arm', 'mips', 'none'],
614 'default': 'none', 647 'default': 'none',
615 'help': 'build with simulator' 648 'help': 'build with simulator'
616 }, 649 },
617 'disassembler': { 650 'disassembler': {
618 'values': ['on', 'off'], 651 'values': ['on', 'off'],
619 'default': 'off', 652 'default': 'off',
620 'help': 'enable the disassembler to inspect generated code' 653 'help': 'enable the disassembler to inspect generated code'
621 }, 654 },
622 'sourcesignatures': { 655 'sourcesignatures': {
623 'values': ['MD5', 'timestamp'], 656 'values': ['MD5', 'timestamp'],
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 self.build_snapshot = (options['snapshot'] == 'on') 784 self.build_snapshot = (options['snapshot'] == 'on')
752 self.flags = None 785 self.flags = None
753 786
754 def AddRelevantFlags(self, initial, flags): 787 def AddRelevantFlags(self, initial, flags):
755 result = initial.copy() 788 result = initial.copy()
756 toolchain = self.options['toolchain'] 789 toolchain = self.options['toolchain']
757 if toolchain in flags: 790 if toolchain in flags:
758 self.AppendFlags(result, flags[toolchain].get('all')) 791 self.AppendFlags(result, flags[toolchain].get('all'))
759 for option in sorted(self.options.keys()): 792 for option in sorted(self.options.keys()):
760 value = self.options[option] 793 value = self.options[option]
794 # On MIPS the flags needed to compile for the HW board are not accepted by gcc
795 # when compiling for x86.
796 if (self.options['simulator'] == 'mips' and value == 'mips'): value = 'm ips-simu'
Søren Thygesen Gjesse 2010/01/20 15:30:28 This seems wrong. It will overwrite both the value
Alexandre 2010/01/22 23:08:42 Removed. On 2010/01/20 15:30:28, Søren Gjesse wrot
761 self.AppendFlags(result, flags[toolchain].get(option + ':' + value)) 797 self.AppendFlags(result, flags[toolchain].get(option + ':' + value))
762 self.AppendFlags(result, flags.get('all')) 798 self.AppendFlags(result, flags.get('all'))
763 return result 799 return result
764 800
765 def AddRelevantSubFlags(self, options, flags): 801 def AddRelevantSubFlags(self, options, flags):
766 self.AppendFlags(options, flags.get('all')) 802 self.AppendFlags(options, flags.get('all'))
767 for option in sorted(self.options.keys()): 803 for option in sorted(self.options.keys()):
768 value = self.options[option] 804 value = self.options[option]
769 self.AppendFlags(options, flags.get(option + ':' + value)) 805 self.AppendFlags(options, flags.get(option + ':' + value))
770 806
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 env['ENV'] = self.env_overrides 846 env['ENV'] = self.env_overrides
811 847
812 848
813 def PostprocessOptions(options): 849 def PostprocessOptions(options):
814 # Adjust architecture if the simulator option has been set 850 # Adjust architecture if the simulator option has been set
815 if (options['simulator'] != 'none') and (options['arch'] != options['simulator ']): 851 if (options['simulator'] != 'none') and (options['arch'] != options['simulator ']):
816 if 'arch' in ARGUMENTS: 852 if 'arch' in ARGUMENTS:
817 # Print a warning if arch has explicitly been set 853 # Print a warning if arch has explicitly been set
818 print "Warning: forcing architecture to match simulator (%s)" % options['s imulator'] 854 print "Warning: forcing architecture to match simulator (%s)" % options['s imulator']
819 options['arch'] = options['simulator'] 855 options['arch'] = options['simulator']
856 # # On MIPS we can't keep mips arch flags when building the emulator
857 # if (options['simulator'] == 'mips-simu')
858 # print "Warning: Don't pay attention to the previous warning. (building mi ps simulator)"
859 # options['arch'] = 'mips'
Søren Thygesen Gjesse 2010/01/20 15:30:28 Chis change should not be needed when the pseudo a
Alexandre 2010/01/22 23:08:42 Removed. On 2010/01/20 15:30:28, Søren Gjesse wrot
820 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'): 860 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'):
821 # Print a warning if profiling is enabled without profiling support 861 # Print a warning if profiling is enabled without profiling support
822 print "Warning: forcing profilingsupport on when prof is on" 862 print "Warning: forcing profilingsupport on when prof is on"
823 options['profilingsupport'] = 'on' 863 options['profilingsupport'] = 'on'
824 864
825 865
826 def ParseEnvOverrides(arg, imports): 866 def ParseEnvOverrides(arg, imports):
827 # The environment overrides are in the format NAME0:value0,NAME1:value1,... 867 # The environment overrides are in the format NAME0:value0,NAME1:value1,...
828 # The environment imports are in the format NAME0,NAME1,... 868 # The environment imports are in the format NAME0,NAME1,...
829 overrides = {} 869 overrides = {}
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 # version of scons. Also, there's a bug in some revisions that 1022 # version of scons. Also, there's a bug in some revisions that
983 # doesn't allow this flag to be set, so we swallow any exceptions. 1023 # doesn't allow this flag to be set, so we swallow any exceptions.
984 # Lovely. 1024 # Lovely.
985 try: 1025 try:
986 SetOption('warn', 'no-deprecated') 1026 SetOption('warn', 'no-deprecated')
987 except: 1027 except:
988 pass 1028 pass
989 1029
990 1030
991 Build() 1031 Build()
OLDNEW
« no previous file with comments | « no previous file | src/SConscript » ('j') | src/allocation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698