Add __isThreadable libRS hack.
diff --git a/lib/bcc/CacheReader.cpp b/lib/bcc/CacheReader.cpp
index c017d36..14dd03e 100644
--- a/lib/bcc/CacheReader.cpp
+++ b/lib/bcc/CacheReader.cpp
@@ -84,17 +84,6 @@
//&& relocate()
;
-
- // TODO(logan): This is the hack for libRS. Should be turned on
- // before caching is ready to go.
-#if 0
- // Check the cache file has __isThreadable or not. If it is set,
- // then we have to call mpSymbolLookupFn for __clearThreadable.
- if (mpHeader->libRSThreadable && mpSymbolLookupFn) {
- mpSymbolLookupFn(mpSymbolLookupContext, "__clearThreadable");
- }
-#endif
-
return result ? mpResult.take() : NULL;
}
@@ -114,6 +103,12 @@
return false;
}
+ // Dirty hack for libRS.
+ // TODO(all): This should be removed in the future.
+ if (mpHeader->libRS_threadable) {
+ mpResult->mLibRSThreadable = true;
+ }
+
return true;
}