Fix Android x86 builds of libvpx
Android previously didn't define rand(). We had a workaround
which used the inline _rand, but they added rand() to android
and removed _rand. So now we call lrand48() which is available
in all versions.
BUG=388490
TBR=tomfinegan@chromium.org
Review URL: https://codereview.chromium.org/355763002
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libvpx@279590 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
diff --git a/libvpx.gyp b/libvpx.gyp
index 7121f54..bb5d5f8 100644
--- a/libvpx.gyp
+++ b/libvpx.gyp
@@ -88,6 +88,17 @@
'-I', '<(libvpx_source)',
'-I', '<(shared_generated_dir)', # Generated assembly offsets
],
+ # yasm only gets the flags we define. It doesn't inherit any of the
+ # really useful defines that come with a gcc invocation. In this
+ # case, we rely on __ANDROID__ to set 'rand' to 'lrand48'.
+ # Previously we used the builtin _rand but that's gone away.
+ 'conditions': [
+ ['OS=="android"', {
+ 'yasm_flags': [
+ '-D', '__ANDROID__',
+ ],
+ }],
+ ],
},
'dependencies': [
'gen_asm_offsets_vp8',