Revision: 16456
Author: [email protected]
Date: Fri Aug 30 14:10:13 2013 UTC
Log: Work-around missing librt for cross-compiling Chrome for Android
in AOSP.
[email protected]
Review URL: https://codereview.chromium.org/23819005
http://code.google.com/p/v8/source/detail?r=16456
Modified:
/branches/bleeding_edge/src/platform/time.cc
/branches/bleeding_edge/tools/gyp/v8.gyp
=======================================
--- /branches/bleeding_edge/src/platform/time.cc Thu Aug 29 09:58:30 2013
UTC
+++ /branches/bleeding_edge/src/platform/time.cc Fri Aug 30 14:10:13 2013
UTC
@@ -509,6 +509,15 @@
info.numer / info.denom);
#elif V8_OS_SOLARIS
ticks = (gethrtime() / Time::kNanosecondsPerMicrosecond);
+#elif V8_LIBRT_NOT_AVAILABLE
+ // TODO(bmeurer): This is a temporary hack to support cross-compiling
+ // Chrome for Android in AOSP. Remove this once AOSP is fixed, also
+ // cleanup the tools/gyp/v8.gyp file.
+ struct timeval tv;
+ int result = gettimeofday(&tv, NULL);
+ ASSERT_EQ(0, result);
+ USE(result);
+ ticks = (tv.tv_sec * Time::kMicrosecondsPerSecond + tv.tv_usec);
#elif V8_OS_POSIX
struct timespec ts;
int result = clock_gettime(CLOCK_MONOTONIC, &ts);
=======================================
--- /branches/bleeding_edge/tools/gyp/v8.gyp Thu Aug 29 09:58:30 2013 UTC
+++ /branches/bleeding_edge/tools/gyp/v8.gyp Fri Aug 30 14:10:13 2013 UTC
@@ -724,15 +724,28 @@
}],
],
}, {
- 'link_settings': {
- 'target_conditions': [
- ['_toolset=="host"', {
- 'libraries': [
- '-lrt'
- ]
- }]
- ]
- },
+ # TODO(bmeurer): What we really want here, is this:
+ #
+ # 'link_settings': {
+ # 'target_conditions': [
+ # ['_toolset=="host"', {
+ # 'libraries': [
+ # '-lrt'
+ # ]
+ # }]
+ # ]
+ # },
+ #
+ # but we can't do this right now, as the AOSP does not
support
+ # linking against the host librt, so we need to work
around this
+ # for now, using the following hack (see platform/time.cc):
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'defines': [
+ 'V8_LIBRT_NOT_AVAILABLE',
+ ],
+ }],
+ ],
'sources': [
'../../src/platform-linux.cc'
]
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.