Bug 135848

Summary: [iOS] Make JavaScriptCore and bmalloc build with the public SDK
Product: WebKit Reporter: Daniel Bates <dbates>
Component: JavaScriptCoreAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, commit-queue, ddkilzer, dfarler, ggaren, joepeck
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   
Bug Depends on: 135843    
Bug Blocks:    
Attachments:
Description Flags
Patch ggaren: review+

Daniel Bates
Reported 2014-08-12 12:43:39 PDT
Towards getting iOS WebKit built using the iOS public SDK, get the WTF, JavaScriptCore, and bmalloc projects building with the iOS public SDK.
Attachments
Patch (9.70 KB, patch)
2014-08-12 12:48 PDT, Daniel Bates
ggaren: review+
Daniel Bates
Comment 1 2014-08-12 12:48:56 PDT
WebKit Commit Bot
Comment 2 2014-08-12 12:51:36 PDT
Attachment 236459 [details] did not pass style-queue: ERROR: Source/bmalloc/bmalloc/PerThread.h:36: __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 1 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
Joseph Pecoraro
Comment 3 2014-08-12 13:05:18 PDT
Comment on attachment 236459 [details] Patch Remote Inspector changes look fine to me.
Geoffrey Garen
Comment 4 2014-08-12 13:57:26 PDT
Comment on attachment 236459 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=236459&action=review r=me > Source/bmalloc/bmalloc/PerThread.h:39 > +#elif BPLATFORM(IOS_SIMULATOR) > +const pthread_key_t __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 = 90; > +INLINE int _pthread_setspecific_direct(pthread_key_t key, const void* value) { return pthread_setspecific(key, value); } > +INLINE void* _pthread_getspecific_direct(pthread_key_t key) { return pthread_getspecific(key); } > +extern "C" int pthread_key_init_np(int, void (*destructor)(void*)); Does the __thread code patch not work in the iOS simulator? If it does work, I think it would be slightly better, so we wouldn't have the brittleness of defining this constant for ourselves.
Mark Rowe (bdash)
Comment 5 2014-08-12 18:52:58 PDT
It's not necessary to check defined(__has_include) in Mac-only files.
Daniel Bates
Comment 6 2014-08-13 12:31:49 PDT
(In reply to comment #4) > (From update of attachment 236459 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=236459&action=review > > r=me > > > Source/bmalloc/bmalloc/PerThread.h:39 > > +#elif BPLATFORM(IOS_SIMULATOR) > > +const pthread_key_t __PTK_FRAMEWORK_JAVASCRIPTCORE_KEY0 = 90; > > +INLINE int _pthread_setspecific_direct(pthread_key_t key, const void* value) { return pthread_setspecific(key, value); } > > +INLINE void* _pthread_getspecific_direct(pthread_key_t key) { return pthread_getspecific(key); } > > +extern "C" int pthread_key_init_np(int, void (*destructor)(void*)); > > Does the __thread code patch not work in the iOS simulator? If it does work, I think it would be slightly better, so we wouldn't have the brittleness of defining this constant for ourselves. No, __thread isn't available when building for iOS Simulator. Filed bug #135895 to consider adding logic for toolchains that don't support C++ thread local storage. I'll add a FIXME comment that references bug #135895 for now.
Daniel Bates
Comment 7 2014-08-13 12:32:27 PDT
(In reply to comment #5) > It's not necessary to check defined(__has_include) in Mac-only files. Will remove the check for "defined(__has_include) " from the Mac-only files in this patch before landing.
Daniel Bates
Comment 8 2014-08-13 12:43:47 PDT
Note You need to log in before you can comment on or make changes to this bug.