Added VPROF option & fixed vprof
This commit is contained in:
parent
dcf5536d93
commit
c40f94a355
2 changed files with 7 additions and 2 deletions
|
@ -490,7 +490,7 @@ ThreadId_t ThreadGetCurrentId()
|
|||
sys_ppu_thread_get_id( &th );
|
||||
return th;
|
||||
#elif defined(POSIX)
|
||||
return (ThreadId_t)pthread_self();
|
||||
return (ThreadId_t)gettid();
|
||||
#else
|
||||
Assert(0);
|
||||
DebuggerBreak();
|
||||
|
|
7
wscript
7
wscript
|
@ -281,11 +281,12 @@ def define_platform(conf):
|
|||
])
|
||||
|
||||
conf.define('GIT_COMMIT_HASH', conf.env.GIT_VERSION)
|
||||
conf.define('VPROF_LEVEL', 1)
|
||||
|
||||
def options(opt):
|
||||
grp = opt.add_option_group('Common options')
|
||||
|
||||
grp.add_option('-P', '--profiling', dest='PROFILING', type = int, default = 0, action='store', help='Add profiling support (0 to 4)')
|
||||
|
||||
grp.add_option('-4', '--32bits', action = 'store_true', dest = 'TARGET32', default = False,
|
||||
help = 'allow targetting 32-bit engine(Linux/Windows/OSX x86 only) [default: %(default)r]')
|
||||
|
||||
|
@ -488,6 +489,10 @@ def configure(conf):
|
|||
'-faligned-new',
|
||||
]
|
||||
|
||||
if conf.options.PROFILING > 0:
|
||||
conf.define('VPROF_LEVEL', conf.options.PROFILING)
|
||||
conf.define('VPROF_ENABLED', 1)
|
||||
|
||||
c_compiler_optional_flags = [
|
||||
'-fnonconst-initializers' # owcc
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue