diff options
-rw-r--r-- | base/base.gypi | 7 | ||||
-rw-r--r-- | base/os_compat_android.cc | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/base/base.gypi b/base/base.gypi index fce37f6..02697b2 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -760,6 +760,13 @@ ['include', '^threading/platform_thread_linux\\.cc$'], ], }], + ['OS == "android" and <(android_webview_build)==1', { + 'defines': [ + # WebView builds as part of the system which already has sincos; + # avoid defining it again as it causes a linker warning. + 'ANDROID_SINCOS_PROVIDED', + ], + }], ['OS == "ios" and _toolset != "host"', { 'sources/': [ # Pull in specific Mac files for iOS (which have been filtered out diff --git a/base/os_compat_android.cc b/base/os_compat_android.cc index 2643dc3..ec221e4 100644 --- a/base/os_compat_android.cc +++ b/base/os_compat_android.cc @@ -75,7 +75,8 @@ time_t timegm(struct tm* const t) { // for each function would simply end up calling itself, resulting in a // runtime crash due to stack overflow. // -#if defined(__GNUC__) && !defined(__clang__) +#if defined(__GNUC__) && !defined(__clang__) && \ + !defined(ANDROID_SINCOS_PROVIDED) // For the record, Clang does not support the 'optimize' attribute. // In the unlikely event that it begins performing this optimization too, |