forked from react-native-community/jsc-android-buildscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsc.patch
186 lines (165 loc) · 7.06 KB
/
jsc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
diff -aur target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp
--- target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-02-03 22:59:08.000000000 +0100
+++ target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-08-02 10:07:11.000383124 +0200
@@ -84,13 +84,8 @@
void* DebugHeap::memalign(size_t alignment, size_t size, bool crashOnFailure)
{
- void* result;
- if (posix_memalign(&result, alignment, size)) {
- if (crashOnFailure)
- BCRASH();
- return nullptr;
- }
- return result;
+ BCRASH();
+ return nullptr;
}
void* DebugHeap::realloc(void* object, size_t size)
diff -aur target-org/webkit/Source/cmake/FindICU.cmake target/webkit/Source/cmake/FindICU.cmake
--- target-org/webkit/Source/cmake/FindICU.cmake 2016-11-30 19:45:57.000000000 +0100
+++ target/webkit/Source/cmake/FindICU.cmake 2017-07-11 11:34:55.962374878 +0200
@@ -25,7 +25,7 @@
# Look for the library.
find_library(
ICU_LIBRARY
- NAMES libicuuc cygicuuc cygicuuc32 icuuc
+ NAMES libicuuc cygicuuc cygicuuc32 icuuc icuuc_jsc
HINTS ${PC_ICU_LIBRARY_DIRS}
${PC_ICU_LIBDIR}
${WEBKIT_LIBRARIES_LINK_DIR}
@@ -51,7 +51,7 @@
pkg_check_modules(PC_ICU_I18N icu-i18n)
find_library(
ICU_I18N_LIBRARY
- NAMES icui18n libicui18n libicuin cygicuin cygicuin32 icuin
+ NAMES icui18n libicui18n libicuin cygicuin cygicuin32 icuin icui18n_jsc
HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
${PC_ICU_I18N_LIBDIR}
${WEBKIT_LIBRARIES_LINK_DIR}
@@ -68,7 +68,7 @@
# Look for the ICU data libraries
find_library(
ICU_DATA_LIBRARY
- NAMES icudata libicudata cygicudata cygicudata32
+ NAMES icudata libicudata cygicudata cygicudata32 icudata_jsc
HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
${PC_ICU_I18N_LIBDIR}
${WEBKIT_LIBRARIES_LINK_DIR}
diff -aur target-org/webkit/Source/cmake/OptionsJSCOnly.cmake target/webkit/Source/cmake/OptionsJSCOnly.cmake
--- target-org/webkit/Source/cmake/OptionsJSCOnly.cmake 2017-04-17 15:51:21.000000000 +0200
+++ target/webkit/Source/cmake/OptionsJSCOnly.cmake 2017-07-11 11:34:55.962374878 +0200
@@ -34,12 +34,11 @@
set(ENABLE_WEBCORE OFF)
set(ENABLE_WEBKIT_LEGACY OFF)
set(ENABLE_WEBKIT OFF)
-
-if (WIN32)
- set(ENABLE_API_TESTS OFF)
-else ()
- set(ENABLE_API_TESTS ON)
-endif ()
+set(ENABLE_API_TESTS OFF)
+set(ENABLE_SAMPLING_PROFILER OFF)
+set(ENABLE_DFG_JIT OFF)
+set(ENABLE_FTL_JIT OFF)
+set(ENABLE_JIT ON)
if (WTF_CPU_X86 OR WTF_CPU_X86_64)
SET_AND_EXPOSE_TO_BUILD(USE_UDIS86 1)
diff -aur target-org/webkit/Source/JavaScriptCore/CMakeLists.txt target/webkit/Source/JavaScriptCore/CMakeLists.txt
--- target-org/webkit/Source/JavaScriptCore/CMakeLists.txt 2017-05-02 21:13:03.000000000 +0200
+++ target/webkit/Source/JavaScriptCore/CMakeLists.txt 2017-07-11 11:34:55.962374878 +0200
@@ -1543,7 +1543,7 @@
target_include_directories(LLIntOffsetsExtractor PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES})
-add_subdirectory(shell)
+# add_subdirectory(shell)
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
WEBKIT_FRAMEWORK(JavaScriptCore)
@@ -1555,6 +1555,7 @@
install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
endif ()
endif ()
+set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME jsc)
# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
diff -aur target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp
--- target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2016-10-08 05:31:15.000000000 +0200
+++ target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2017-07-11 11:34:55.962374878 +0200
@@ -24,24 +24,29 @@
#include <locale.h>
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
+#include <sys/system_properties.h>
namespace WTF {
void setPlatformUserPreferredLanguagesChangedCallback(void (*)()) { }
-// Using pango_language_get_default() here is not an option, because
-// it doesn't support changing the locale in runtime, so it returns
-// always the same value.
static String platformLanguage()
{
- String localeDefault(setlocale(LC_CTYPE, nullptr));
- if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX"))
+ char buf[2 * (PROP_VALUE_MAX + 1)];
+
+ int locale_len = __system_property_get("persist.sys.locale", buf);
+ if (locale_len == 0) {
+ int lang_len = __system_property_get("persist.sys.language", buf);
+ if(lang_len == 0) {
return ASCIILiteral("en-US");
+ }
+ int country_len = __system_property_get("persist.sys.country", buf + lang_len + 1);
+ if(country_len != 0) {
+ buf[lang_len] = '-';
+ }
+ }
- String normalizedDefault = localeDefault;
- normalizedDefault.replace('_', '-');
- normalizedDefault.truncate(normalizedDefault.find('.'));
- return normalizedDefault;
+ return String(buf);
}
Vector<String> platformUserPreferredLanguages()
diff -aur target-org/webkit/Source/WTF/wtf/StackTrace.cpp target/webkit/Source/WTF/wtf/StackTrace.cpp
--- target-org/webkit/Source/WTF/wtf/StackTrace.cpp 2017-04-25 04:53:49.000000000 +0200
+++ target/webkit/Source/WTF/wtf/StackTrace.cpp 2017-07-11 11:34:55.962374878 +0200
@@ -30,10 +30,6 @@
#include <wtf/Assertions.h>
#include <wtf/PrintStream.h>
-#if HAVE(BACKTRACE_SYMBOLS) || HAVE(BACKTRACE)
-#include <execinfo.h>
-#endif
-
#if HAVE(DLADDR)
#include <cxxabi.h>
#include <dlfcn.h>
diff -aur target-org/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp
--- target-org/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2014-03-15 05:08:27.000000000 +0100
+++ target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2017-07-11 11:36:01.845264855 +0200
@@ -28,12 +28,13 @@
#include "config.h"
#include "Collator.h"
+#include <StringView.h>
#if UCONFIG_NO_COLLATION
namespace WTF {
-int Collator::collate(StringView a, StringView b) const
+int Collator::collate(StringView a, StringView b)
{
unsigned commonLength = std::min(a.length(), b.length());
for (unsigned i = 0; i < commonLength; ++i) {
@@ -51,7 +52,7 @@
return 0;
}
-int Collator::collateUTF8(const char* a, const char* b) const
+int Collator::collateUTF8(const char* a, const char* b)
{
return collate(String::fromUTF8(a), String::fromUTF8(b));
}
diff -aur org/target/webkit/Source/cmake/OptionsCommon.cmake target/webkit/Source/cmake/OptionsCommon.cmake
--- target-org/webkit/Source/cmake/OptionsCommon.cmake 2017-11-15 16:28:52.120093206 +0100
+++ target/webkit/Source/cmake/OptionsCommon.cmake 2017-04-09 02:50:32.875166000 +0200
@@ -255,7 +255,7 @@
# Check for headers
_HAVE_CHECK_INCLUDE(HAVE_ERRNO_H errno.h)
-_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
+#_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
_HAVE_CHECK_INCLUDE(HAVE_MMAP sys/mman.h)
_HAVE_CHECK_INCLUDE(HAVE_PTHREAD_NP_H pthread_np.h)
_HAVE_CHECK_INCLUDE(HAVE_STRINGS_H strings.h)