@@ -96,25 +96,33 @@ ANDROID_LINKFLAGS = ['-nostdlib',
9696
9797LIBRARY_FLAGS = {
9898 'all' : {
99- 'CPPDEFINES' : ['ENABLE_LOGGING_AND_PROFILING' ],
10099 'CPPPATH' : [join (root_dir , 'src' )],
101100 'regexp:native' : {
102101 'CPPDEFINES' : ['V8_NATIVE_REGEXP' ]
103102 },
104103 'mode:debug' : {
105104 'CPPDEFINES' : ['V8_ENABLE_CHECKS' ]
105+ },
106+ 'profilingsupport:on' : {
107+ 'CPPDEFINES' : ['ENABLE_LOGGING_AND_PROFILING' ],
108+ },
109+ 'debuggersupport:on' : {
110+ 'CPPDEFINES' : ['ENABLE_DEBUGGER_SUPPORT' ],
106111 }
107112 },
108113 'gcc' : {
109114 'all' : {
110115 'CCFLAGS' : ['$DIALECTFLAGS' , '$WARNINGFLAGS' ],
111116 'CXXFLAGS' : ['$CCFLAGS' , '-fno-rtti' , '-fno-exceptions' ],
112117 },
118+ 'visibility:hidden' : {
119+ # Use visibility=default to disable this.
120+ 'CXXFLAGS' : ['-fvisibility=hidden' ]
121+ },
113122 'mode:debug' : {
114123 'CCFLAGS' : ['-g' , '-O0' ],
115124 'CPPDEFINES' : ['ENABLE_DISASSEMBLER' , 'DEBUG' ],
116125 'os:android' : {
117- 'CPPDEFINES' : ['ENABLE_DEBUGGER_SUPPORT' ],
118126 'CCFLAGS' : ['-mthumb' ]
119127 }
120128 },
@@ -123,7 +131,7 @@ LIBRARY_FLAGS = {
123131 '-ffunction-sections' ],
124132 'os:android' : {
125133 'CCFLAGS' : ['-mthumb' , '-Os' ],
126- 'CPPDEFINES' : ['SK_RELEASE' , 'NDEBUG' , 'ENABLE_DEBUGGER_SUPPORT' ]
134+ 'CPPDEFINES' : ['SK_RELEASE' , 'NDEBUG' ]
127135 }
128136 },
129137 'os:linux' : {
@@ -229,7 +237,6 @@ LIBRARY_FLAGS = {
229237V8_EXTRA_FLAGS = {
230238 'gcc' : {
231239 'all' : {
232- 'CXXFLAGS' : [], #['-fvisibility=hidden'],
233240 'WARNINGFLAGS' : ['-Wall' ,
234241 '-Werror' ,
235242 '-W' ,
@@ -576,6 +583,16 @@ SIMPLE_OPTIONS = {
576583 'default' : 'static' ,
577584 'help' : 'the type of library to produce'
578585 },
586+ 'profilingsupport' : {
587+ 'values' : ['on' , 'off' ],
588+ 'default' : 'on' ,
589+ 'help' : 'enable profiling of JavaScript code'
590+ },
591+ 'debuggersupport' : {
592+ 'values' : ['on' , 'off' ],
593+ 'default' : 'on' ,
594+ 'help' : 'enable debugging of JavaScript code'
595+ },
579596 'soname' : {
580597 'values' : ['on' , 'off' ],
581598 'default' : 'off' ,
@@ -615,6 +632,11 @@ SIMPLE_OPTIONS = {
615632 'values' : ['on' , 'off' ],
616633 'default' : 'off' ,
617634 'help' : 'more output from compiler and linker'
635+ },
636+ 'visibility' : {
637+ 'values' : ['default' , 'hidden' ],
638+ 'default' : 'hidden' ,
639+ 'help' : 'shared library symbol visibility'
618640 }
619641}
620642
@@ -794,6 +816,10 @@ def PostprocessOptions(options):
794816 # Print a warning if arch has explicitly been set
795817 print "Warning: forcing architecture to match simulator (%s)" % options ['simulator' ]
796818 options ['arch' ] = options ['simulator' ]
819+ if (options ['prof' ] != 'off' ) and (options ['profilingsupport' ] == 'off' ):
820+ # Print a warning if profiling is enabled without profiling support
821+ print "Warning: forcing profilingsupport on when prof is on"
822+ options ['profilingsupport' ] = 'on'
797823
798824
799825def ParseEnvOverrides (arg , imports ):
0 commit comments