Skip to content

Commit a8e1e03

Browse files
committed
Modified to build as a static library on iOS
1 parent 39d08b9 commit a8e1e03

File tree

9 files changed

+3282
-15
lines changed

9 files changed

+3282
-15
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
DerivedData/
33
build/
4-
xcuserdata
4+
xcuserdata
5+
*.pyc

JavaScriptCore/API/JSWrapperMap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
#import <JavaScriptCore/JavaScriptCore.h>
2727
#import <JSValueInternal.h>
28-
#import <objc/objc-runtime.h>
28+
#import <objc/runtime.h>
2929

3030
#if JSC_OBJC_API_ENABLED
3131

JavaScriptCore/Configurations/Base.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ DEAD_CODE_STRIPPING_debug = NO;
144144
DEAD_CODE_STRIPPING_normal = YES;
145145
DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
146146

147-
SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(PLATFORM_NAME));
147+
SECTORDER_FLAGS = ;
148148
SECTORDER_FLAGS_iphoneos = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/JavaScriptCore.order;
149149
SECTORDER_FLAGS_macosx = -Wl,-order_file,JavaScriptCore.order;
150150

JavaScriptCore/Configurations/FeatureDefines.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ ENABLE_PROXIMITY_EVENTS = ;
177177
ENABLE_PUBLIC_SUFFIX_LIST = ENABLE_PUBLIC_SUFFIX_LIST;
178178
ENABLE_QUOTA = ;
179179
ENABLE_REQUEST_ANIMATION_FRAME = ENABLE_REQUEST_ANIMATION_FRAME;
180-
ENABLE_REMOTE_INSPECTOR = $(ENABLE_REMOTE_INSPECTOR_$(PLATFORM_NAME));
180+
ENABLE_REMOTE_INSPECTOR = ;
181181
ENABLE_REMOTE_INSPECTOR_iphoneos = ENABLE_REMOTE_INSPECTOR;
182182
ENABLE_REMOTE_INSPECTOR_iphonesimulator = $(ENABLE_REMOTE_INSPECTOR_iphoneos);
183183
ENABLE_REMOTE_INSPECTOR_macosx = $(ENABLE_REMOTE_INSPECTOR_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR))

JavaScriptCore/Configurations/JavaScriptCore.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ JSVALUE_MODEL_x86_64 = 64;
3636
// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
3737
OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvvEEclEv -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEEC1EOS2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEEC2EOS2_ -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEEclES3_S5_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEED2Ev -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-all_load;
3838

39-
OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
39+
OTHER_LDFLAGS_BASE = ;
4040
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
4141
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
4242
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);

JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

Lines changed: 3239 additions & 0 deletions
Large diffs are not rendered by default.

WTF/WTF.xcodeproj/project.pbxproj

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
0FD81AC5154FB22E00983E72 /* FastBitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD81AC4154FB22E00983E72 /* FastBitVector.h */; settings = {ATTRIBUTES = (); }; };
4141
0FDDBFA71666DFA300C55FEF /* StringPrintStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FDDBFA51666DFA300C55FEF /* StringPrintStream.cpp */; };
4242
0FDDBFA81666DFA300C55FEF /* StringPrintStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FDDBFA61666DFA300C55FEF /* StringPrintStream.h */; };
43-
14022F4118F5C3FC007FF0EB /* libbmalloc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 14022F4018F5C3FC007FF0EB /* libbmalloc.a */; };
4443
143F611F1565F0F900DB514A /* RAMSize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 143F611D1565F0F900DB514A /* RAMSize.cpp */; };
4544
143F61201565F0F900DB514A /* RAMSize.h in Headers */ = {isa = PBXBuildFile; fileRef = 143F611E1565F0F900DB514A /* RAMSize.h */; settings = {ATTRIBUTES = (); }; };
4645
1447AEC618FCE57700B3D7FF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1447AEC518FCE57700B3D7FF /* Foundation.framework */; };
@@ -585,7 +584,6 @@
585584
isa = PBXFrameworksBuildPhase;
586585
buildActionMask = 2147483647;
587586
files = (
588-
14022F4118F5C3FC007FF0EB /* libbmalloc.a in Frameworks */,
589587
);
590588
runOnlyForDeploymentPostprocessing = 0;
591589
};
@@ -1415,13 +1413,31 @@
14151413
isa = XCBuildConfiguration;
14161414
baseConfigurationReference = 5D247B7314689C4700E78B76 /* WTF.xcconfig */;
14171415
buildSettings = {
1416+
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
1417+
GCC_PREPROCESSOR_DEFINITIONS = (
1418+
"$(DEBUG_DEFINES)",
1419+
"WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST",
1420+
HAVE_HEADER_DETECTION_H,
1421+
"$(GCC_PREPROCESSOR_DEFINITIONS)",
1422+
"UCONFIG_NO_COLLATION=1",
1423+
"HAVE_QOS_CLASSES=0",
1424+
);
14181425
};
14191426
name = Debug;
14201427
};
14211428
5D247B6814689B8600E78B76 /* Release */ = {
14221429
isa = XCBuildConfiguration;
14231430
baseConfigurationReference = 5D247B7314689C4700E78B76 /* WTF.xcconfig */;
14241431
buildSettings = {
1432+
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
1433+
GCC_PREPROCESSOR_DEFINITIONS = (
1434+
"$(DEBUG_DEFINES)",
1435+
"WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST",
1436+
HAVE_HEADER_DETECTION_H,
1437+
"$(GCC_PREPROCESSOR_DEFINITIONS)",
1438+
"UCONFIG_NO_COLLATION=1",
1439+
"HAVE_QOS_CLASSES=0",
1440+
);
14251441
};
14261442
name = Release;
14271443
};
@@ -1436,6 +1452,15 @@
14361452
isa = XCBuildConfiguration;
14371453
baseConfigurationReference = 5D247B7314689C4700E78B76 /* WTF.xcconfig */;
14381454
buildSettings = {
1455+
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
1456+
GCC_PREPROCESSOR_DEFINITIONS = (
1457+
"$(DEBUG_DEFINES)",
1458+
"WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST",
1459+
HAVE_HEADER_DETECTION_H,
1460+
"$(GCC_PREPROCESSOR_DEFINITIONS)",
1461+
"UCONFIG_NO_COLLATION=1",
1462+
"HAVE_QOS_CLASSES=0",
1463+
);
14391464
};
14401465
name = Production;
14411466
};

WTF/wtf/mac/MainThreadMac.mm

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,23 +40,23 @@
4040
#include <wtf/ios/WebCoreThread.h>
4141
#endif
4242

43-
@interface JSWTFMainThreadCaller : NSObject {
43+
@interface TNSWTFMainThreadCaller : NSObject {
4444
}
4545
- (void)call;
4646
@end
4747

48-
@implementation JSWTFMainThreadCaller
48+
@implementation TNSWTFMainThreadCaller
4949

5050
- (void)call
5151
{
5252
WTF::dispatchFunctionsFromMainThread();
5353
}
5454

55-
@end // implementation JSWTFMainThreadCaller
55+
@end // implementation TNSWTFMainThreadCaller
5656

5757
namespace WTF {
5858

59-
static JSWTFMainThreadCaller* staticMainThreadCaller;
59+
static TNSWTFMainThreadCaller* staticMainThreadCaller;
6060
static bool isTimerPosted; // This is only accessed on the 'main' thread.
6161
static bool mainThreadEstablishedAsPthreadMain;
6262
static pthread_t mainThreadPthread;
@@ -70,7 +70,7 @@ - (void)call
7070
void initializeMainThreadPlatform()
7171
{
7272
ASSERT(!staticMainThreadCaller);
73-
staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];
73+
staticMainThreadCaller = [[TNSWTFMainThreadCaller alloc] init];
7474

7575
#if !USE(WEB_THREAD)
7676
mainThreadEstablishedAsPthreadMain = false;
@@ -92,7 +92,7 @@ void initializeMainThreadToProcessMainThreadPlatform()
9292
NSLog(@"WebKit Threading Violation - initial use of WebKit from a secondary thread.");
9393

9494
ASSERT(!staticMainThreadCaller);
95-
staticMainThreadCaller = [[JSWTFMainThreadCaller alloc] init];
95+
staticMainThreadCaller = [[TNSWTFMainThreadCaller alloc] init];
9696

9797
mainThreadEstablishedAsPthreadMain = true;
9898
mainThreadPthread = 0;

WTF/wtf/unicode/CollatorDefault.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131

3232
#if UCONFIG_NO_COLLATION
3333

34+
#include <wtf/text/StringView.h>
35+
3436
namespace WTF {
3537

36-
int Collator::collate(StringView a, StringView b) const
38+
int Collator::collate(StringView a, StringView b)
3739
{
3840
unsigned commonLength = std::min(a.length(), b.length());
3941
for (unsigned i = 0; i < commonLength; ++i) {
@@ -51,7 +53,7 @@ int Collator::collate(StringView a, StringView b) const
5153
return 0;
5254
}
5355

54-
int Collator::collateUTF8(const char* a, const char* b) const
56+
int Collator::collateUTF8(const char* a, const char* b)
5557
{
5658
return collate(String::fromUTF8(a), String::fromUTF8(b));
5759
}

0 commit comments

Comments
 (0)