@@ -96,25 +96,33 @@ ANDROID_LINKFLAGS = ['-nostdlib',
96
96
97
97
LIBRARY_FLAGS = {
98
98
'all' : {
99
- 'CPPDEFINES' : ['ENABLE_LOGGING_AND_PROFILING' ],
100
99
'CPPPATH' : [join (root_dir , 'src' )],
101
100
'regexp:native' : {
102
101
'CPPDEFINES' : ['V8_NATIVE_REGEXP' ]
103
102
},
104
103
'mode:debug' : {
105
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
113
'gcc' : {
109
114
'all' : {
110
115
'CCFLAGS' : ['$DIALECTFLAGS' , '$WARNINGFLAGS' ],
111
116
'CXXFLAGS' : ['$CCFLAGS' , '-fno-rtti' , '-fno-exceptions' ],
112
117
},
118
+ 'visibility:hidden' : {
119
+ # Use visibility=default to disable this.
120
+ 'CXXFLAGS' : ['-fvisibility=hidden' ]
121
+ },
113
122
'mode:debug' : {
114
123
'CCFLAGS' : ['-g' , '-O0' ],
115
124
'CPPDEFINES' : ['ENABLE_DISASSEMBLER' , 'DEBUG' ],
116
125
'os:android' : {
117
- 'CPPDEFINES' : ['ENABLE_DEBUGGER_SUPPORT' ],
118
126
'CCFLAGS' : ['-mthumb' ]
119
127
}
120
128
},
@@ -123,7 +131,7 @@ LIBRARY_FLAGS = {
123
131
'-ffunction-sections' ],
124
132
'os:android' : {
125
133
'CCFLAGS' : ['-mthumb' , '-Os' ],
126
- 'CPPDEFINES' : ['SK_RELEASE' , 'NDEBUG' , 'ENABLE_DEBUGGER_SUPPORT' ]
134
+ 'CPPDEFINES' : ['SK_RELEASE' , 'NDEBUG' ]
127
135
}
128
136
},
129
137
'os:linux' : {
@@ -229,7 +237,6 @@ LIBRARY_FLAGS = {
229
237
V8_EXTRA_FLAGS = {
230
238
'gcc' : {
231
239
'all' : {
232
- 'CXXFLAGS' : [], #['-fvisibility=hidden'],
233
240
'WARNINGFLAGS' : ['-Wall' ,
234
241
'-Werror' ,
235
242
'-W' ,
@@ -576,6 +583,16 @@ SIMPLE_OPTIONS = {
576
583
'default' : 'static' ,
577
584
'help' : 'the type of library to produce'
578
585
},
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
+ },
579
596
'soname' : {
580
597
'values' : ['on' , 'off' ],
581
598
'default' : 'off' ,
@@ -615,6 +632,11 @@ SIMPLE_OPTIONS = {
615
632
'values' : ['on' , 'off' ],
616
633
'default' : 'off' ,
617
634
'help' : 'more output from compiler and linker'
635
+ },
636
+ 'visibility' : {
637
+ 'values' : ['default' , 'hidden' ],
638
+ 'default' : 'hidden' ,
639
+ 'help' : 'shared library symbol visibility'
618
640
}
619
641
}
620
642
@@ -794,6 +816,10 @@ def PostprocessOptions(options):
794
816
# Print a warning if arch has explicitly been set
795
817
print "Warning: forcing architecture to match simulator (%s)" % options ['simulator' ]
796
818
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'
797
823
798
824
799
825
def ParseEnvOverrides (arg , imports ):
0 commit comments