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

Side by Side Diff: SConstruct

Issue 195061: Control profiling/debugger support from build script (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 3 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/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 '-Wl,-dynamic-linker,/system/bin/linker', 89 '-Wl,-dynamic-linker,/system/bin/linker',
90 '-Wl,--gc-sections', 90 '-Wl,--gc-sections',
91 '-Wl,-z,nocopyreloc', 91 '-Wl,-z,nocopyreloc',
92 '-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/gen eric/obj/lib', 92 '-Wl,-rpath-link=' + ANDROID_TOP + '/out/target/product/gen eric/obj/lib',
93 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin _dynamic.o', 93 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtbegin _dynamic.o',
94 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1 /lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a', 94 ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1 /lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a',
95 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_a ndroid.o']; 95 ANDROID_TOP + '/out/target/product/generic/obj/lib/crtend_a ndroid.o'];
96 96
97 LIBRARY_FLAGS = { 97 LIBRARY_FLAGS = {
98 'all': { 98 'all': {
99 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'],
100 'CPPPATH': [join(root_dir, 'src')], 99 'CPPPATH': [join(root_dir, 'src')],
101 'regexp:native': { 100 'regexp:native': {
102 'CPPDEFINES': ['V8_NATIVE_REGEXP'] 101 'CPPDEFINES': ['V8_NATIVE_REGEXP']
103 }, 102 },
104 'mode:debug': { 103 'mode:debug': {
105 'CPPDEFINES': ['V8_ENABLE_CHECKS'] 104 'CPPDEFINES': ['V8_ENABLE_CHECKS']
105 },
106 'profilingsupport:on': {
107 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'],
108 },
109 'debuggersupport:on': {
110 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'],
106 } 111 }
107 }, 112 },
108 'gcc': { 113 'gcc': {
109 'all': { 114 'all': {
110 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'], 115 'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
111 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'], 116 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
112 }, 117 },
113 'mode:debug': { 118 'mode:debug': {
114 'CCFLAGS': ['-g', '-O0'], 119 'CCFLAGS': ['-g', '-O0'],
115 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'], 120 'CPPDEFINES': ['ENABLE_DISASSEMBLER', 'DEBUG'],
116 'os:android': { 121 'os:android': {
117 'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'],
118 'CCFLAGS': ['-mthumb'] 122 'CCFLAGS': ['-mthumb']
119 } 123 }
120 }, 124 },
121 'mode:release': { 125 'mode:release': {
122 'CCFLAGS': ['-O3', '-fomit-frame-pointer', '-fdata-sections', 126 'CCFLAGS': ['-O3', '-fomit-frame-pointer', '-fdata-sections',
123 '-ffunction-sections'], 127 '-ffunction-sections'],
124 'os:android': { 128 'os:android': {
125 'CCFLAGS': ['-mthumb', '-Os'], 129 'CCFLAGS': ['-mthumb', '-Os'],
126 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG', 'ENABLE_DEBUGGER_SUPPORT'] 130 'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
127 } 131 }
128 }, 132 },
129 'os:linux': { 133 'os:linux': {
130 'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS, 134 'CCFLAGS': ['-ansi'] + GCC_EXTRA_CCFLAGS,
131 'library:shared': { 135 'library:shared': {
132 'CPPDEFINES': ['V8_SHARED'], 136 'CPPDEFINES': ['V8_SHARED'],
133 'LIBS': ['pthread'] 137 'LIBS': ['pthread']
134 } 138 }
135 }, 139 },
136 'os:macos': { 140 'os:macos': {
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 'prof': { 573 'prof': {
570 'values': ['on', 'off', 'oprofile'], 574 'values': ['on', 'off', 'oprofile'],
571 'default': 'off', 575 'default': 'off',
572 'help': 'enable profiling of build target' 576 'help': 'enable profiling of build target'
573 }, 577 },
574 'library': { 578 'library': {
575 'values': ['static', 'shared'], 579 'values': ['static', 'shared'],
576 'default': 'static', 580 'default': 'static',
577 'help': 'the type of library to produce' 581 'help': 'the type of library to produce'
578 }, 582 },
583 'profilingsupport': {
584 'values': ['on', 'off'],
585 'default': 'on',
586 'help': 'enable profiling of JavaScript code'
587 },
588 'debuggersupport': {
589 'values': ['on', 'off'],
590 'default': 'on',
591 'help': 'enable debugging of JavaScript code'
592 },
579 'soname': { 593 'soname': {
580 'values': ['on', 'off'], 594 'values': ['on', 'off'],
581 'default': 'off', 595 'default': 'off',
582 'help': 'turn on setting soname for Linux shared library' 596 'help': 'turn on setting soname for Linux shared library'
583 }, 597 },
584 'msvcrt': { 598 'msvcrt': {
585 'values': ['static', 'shared'], 599 'values': ['static', 'shared'],
586 'default': 'static', 600 'default': 'static',
587 'help': 'the type of Microsoft Visual C++ runtime library to use' 601 'help': 'the type of Microsoft Visual C++ runtime library to use'
588 }, 602 },
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 env['ENV'] = self.env_overrides 801 env['ENV'] = self.env_overrides
788 802
789 803
790 def PostprocessOptions(options): 804 def PostprocessOptions(options):
791 # Adjust architecture if the simulator option has been set 805 # Adjust architecture if the simulator option has been set
792 if (options['simulator'] != 'none') and (options['arch'] != options['simulator ']): 806 if (options['simulator'] != 'none') and (options['arch'] != options['simulator ']):
793 if 'arch' in ARGUMENTS: 807 if 'arch' in ARGUMENTS:
794 # Print a warning if arch has explicitly been set 808 # Print a warning if arch has explicitly been set
795 print "Warning: forcing architecture to match simulator (%s)" % options['s imulator'] 809 print "Warning: forcing architecture to match simulator (%s)" % options['s imulator']
796 options['arch'] = options['simulator'] 810 options['arch'] = options['simulator']
811 if (options['prof'] != 'off') and (options['profilingsupport'] == 'off'):
812 # Print a warning if profiling is enabled without profiling support
813 print "Warning: forcing profilingsupport on when prof is on"
814 options['profilingsupport'] = 'on'
797 815
798 816
799 def ParseEnvOverrides(arg, imports): 817 def ParseEnvOverrides(arg, imports):
800 # The environment overrides are in the format NAME0:value0,NAME1:value1,... 818 # The environment overrides are in the format NAME0:value0,NAME1:value1,...
801 # The environment imports are in the format NAME0,NAME1,... 819 # The environment imports are in the format NAME0,NAME1,...
802 overrides = {} 820 overrides = {}
803 for var in imports.split(','): 821 for var in imports.split(','):
804 if var in os.environ: 822 if var in os.environ:
805 overrides[var] = os.environ[var] 823 overrides[var] = os.environ[var]
806 for override in arg.split(','): 824 for override in arg.split(','):
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 # version of scons. Also, there's a bug in some revisions that 973 # version of scons. Also, there's a bug in some revisions that
956 # doesn't allow this flag to be set, so we swallow any exceptions. 974 # doesn't allow this flag to be set, so we swallow any exceptions.
957 # Lovely. 975 # Lovely.
958 try: 976 try:
959 SetOption('warn', 'no-deprecated') 977 SetOption('warn', 'no-deprecated')
960 except: 978 except:
961 pass 979 pass
962 980
963 981
964 Build() 982 Build()
OLDNEW
« no previous file with comments | « no previous file | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698