No threadsafe statics.
Chrome disables these for speed and code size, so we need to disable them to make sure our code is safe when used this way. int foo() { static int32_t atomic_thing; return sk_atomic_inc(&atomic_thing); } is not safe in Chrome. Making the static global is: static int32_t atomic_thing; int foo() { return sk_atomic_inc(&atomic_thing); } BUG=skia: Review URL: https://codereview.chromium.org/654663002
This commit is contained in:
parent
c09e2af17f
commit
cad5d3e264
@ -202,6 +202,7 @@
|
||||
],
|
||||
'cflags_cc': [
|
||||
'-fno-rtti',
|
||||
'-fno-threadsafe-statics', # Chrome disables this, so for safety we should too.
|
||||
'-Wnon-virtual-dtor',
|
||||
'-Wno-invalid-offsetof', # GCC <4.6 is old-school strict about what is POD.
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user