diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index c5ab248175..91d14d0602 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -259,24 +259,16 @@ 'defines': [ 'WEBRTC_MAC', 'WEBRTC_IOS', - 'WEBRTC_THREAD_RR', - 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], ['OS=="linux"', { 'defines': [ 'WEBRTC_LINUX', - 'WEBRTC_THREAD_RR', - # TODO(andrew): can we select this automatically? - # Define this if the Linux system does not support CLOCK_MONOTONIC. - #'WEBRTC_CLOCK_TYPE_REALTIME', ], }], ['OS=="mac"', { 'defines': [ 'WEBRTC_MAC', - 'WEBRTC_THREAD_RR', - 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], ['OS=="win"', { @@ -297,12 +289,6 @@ 'defines': [ 'WEBRTC_LINUX', 'WEBRTC_ANDROID', - # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC - # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now, - # remove it after I verify that CLOCK_MONOTONIC is fully functional - # with condition and event functions in system_wrappers. - 'WEBRTC_CLOCK_TYPE_REALTIME', - 'WEBRTC_THREAD_RR', ], 'conditions': [ ['enable_android_opensl==1', { diff --git a/webrtc/system_wrappers/source/system_wrappers.gyp b/webrtc/system_wrappers/source/system_wrappers.gyp index 8bc947b40c..36e003dbde 100644 --- a/webrtc/system_wrappers/source/system_wrappers.gyp +++ b/webrtc/system_wrappers/source/system_wrappers.gyp @@ -133,9 +133,23 @@ ], }], ['OS=="android"', { + 'defines': [ + 'WEBRTC_THREAD_RR', + # TODO(leozwang): Investigate CLOCK_REALTIME and CLOCK_MONOTONIC + # support on Android. Keep WEBRTC_CLOCK_TYPE_REALTIME for now, + # remove it after I verify that CLOCK_MONOTONIC is fully functional + # with condition and event functions in system_wrappers. + 'WEBRTC_CLOCK_TYPE_REALTIME', + ], 'dependencies': [ 'cpu_features_android', ], }], ['OS=="linux"', { + 'defines': [ + 'WEBRTC_THREAD_RR', + # TODO(andrew): can we select this automatically? + # Define this if the Linux system does not support CLOCK_MONOTONIC. + #'WEBRTC_CLOCK_TYPE_REALTIME', + ], 'link_settings': { 'libraries': [ '-lrt', ], }, @@ -148,6 +162,12 @@ 'atomic32_posix.cc', ], }], + ['OS=="ios" or OS=="mac"', { + 'defines': [ + 'WEBRTC_THREAD_RR', + 'WEBRTC_CLOCK_TYPE_REALTIME', + ], + }], ['OS=="win"', { 'link_settings': { 'libraries': [ '-lwinmm.lib', ],