Merge pull request #1756 from abarth/fix_android

Fix Android build
This commit is contained in:
Adam Barth 2015-10-23 09:37:16 -07:00
commit cfc5ac454b

View File

@ -82,8 +82,6 @@ static const char* kDartArgs[] = {
#endif
};
static const char* kInstructionsSnapshotSymbolName = "kInstructionsSnapshot";
static const char* kDartPrecompilationArgs[] {
"--precompilation",
};
@ -110,7 +108,11 @@ bool IsServiceIsolateURL(const char* url_name) {
static const uint8_t* PrecompiledInstructionsSymbolIfPresent() {
dlerror(); // clear previous errors on thread
void * sym = dlsym(RTLD_SELF, kInstructionsSnapshotSymbolName);
void* sym = nullptr;
#ifdef RTLD_SELF
static const char kInstructionsSnapshotSymbolName[] = "kInstructionsSnapshot";
sym = dlsym(RTLD_SELF, kInstructionsSnapshotSymbolName);
#endif
return (dlerror() != nullptr) ? nullptr : reinterpret_cast<uint8_t * >(sym);
}