Skip to content

Commit 067e6b3

Browse files
committed
Revert "modified patches to support 2.20.3"
This reverts commit 72fe1cd.
1 parent 9bdec14 commit 067e6b3

File tree

4 files changed

+153
-151
lines changed

4 files changed

+153
-151
lines changed

patches/intl/icu-disabled.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -aur target-icucollator/webkit/Source/WTF/wtf/CMakeLists.txt target/webkit/Source/WTF/wtf/CMakeLists.txt
2+
--- target-icucollator/webkit/Source/WTF/wtf/CMakeLists.txt 2017-07-11 13:16:20.800299018 +0200
3+
+++ target/webkit/Source/WTF/wtf/CMakeLists.txt 2017-07-11 13:17:20.743222116 +0200
4+
@@ -331,7 +331,7 @@
5+
endif ()
6+
7+
list(APPEND WTF_SOURCES
8+
- unicode/icu/CollatorICU.cpp
9+
+ unicode/CollatorDefault.cpp
10+
)
11+
set(WTF_SYSTEM_INCLUDE_DIRECTORIES
12+
${ICU_INCLUDE_DIRS}

patches/jsc.patch

Lines changed: 130 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,8 @@
1-
diff -aur download/webkit/CMakeLists.txt target/webkit/CMakeLists.txt
2-
--- download/webkit/CMakeLists.txt 2017-12-22 19:18:43.000000000 +0200
3-
+++ target/webkit/CMakeLists.txt 2018-06-14 15:41:59.000000000 +0300
4-
@@ -170,13 +170,13 @@
5-
add_subdirectory(Tools)
6-
endif ()
7-
8-
-if ("${PORT}" STREQUAL "GTK" OR "${PORT}" STREQUAL "WPE")
9-
- if (DEVELOPER_MODE)
10-
- add_subdirectory(PerformanceTests)
11-
- endif ()
12-
-else ()
13-
- add_subdirectory(PerformanceTests)
14-
-endif ()
15-
+#if ("${PORT}" STREQUAL "GTK" OR "${PORT}" STREQUAL "WPE")
16-
+# if (DEVELOPER_MODE)
17-
+# add_subdirectory(PerformanceTests)
18-
+# endif ()
19-
+#else ()
20-
+# add_subdirectory(PerformanceTests)
21-
+#endif ()
22-
23-
# -----------------------------------------------------------------------------
24-
# Print the features list last, for maximum visibility.
25-
diff -aur download/webkit/Source/JavaScriptCore/CMakeLists.txt target/webkit/Source/JavaScriptCore/CMakeLists.txt
26-
--- download/webkit/Source/JavaScriptCore/CMakeLists.txt 2018-06-11 12:03:52.000000000 +0300
27-
+++ target/webkit/Source/JavaScriptCore/CMakeLists.txt 2018-06-14 15:41:18.000000000 +0300
28-
@@ -1155,7 +1155,7 @@
29-
)
30-
target_include_directories(LLIntOffsetsExtractor SYSTEM PRIVATE ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
31-
32-
-add_subdirectory(shell)
33-
+# add_subdirectory(shell)
34-
35-
WEBKIT_COMPUTE_SOURCES(JavaScriptCore)
36-
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
37-
@@ -1168,6 +1168,7 @@
38-
install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
39-
endif ()
40-
endif ()
41-
+set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME jsc)
42-
43-
# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
44-
45-
diff -aur download/webkit/Source/WTF/wtf/StackTrace.cpp target/webkit/Source/WTF/wtf/StackTrace.cpp
46-
--- download/webkit/Source/WTF/wtf/StackTrace.cpp 2017-07-14 19:03:47.000000000 +0300
47-
+++ target/webkit/Source/WTF/wtf/StackTrace.cpp 2018-06-14 15:41:18.000000000 +0300
48-
@@ -30,10 +30,6 @@
49-
#include <wtf/Assertions.h>
50-
#include <wtf/PrintStream.h>
51-
52-
-#if HAVE(BACKTRACE_SYMBOLS) || HAVE(BACKTRACE)
53-
-#include <execinfo.h>
54-
-#endif
55-
-
56-
#if HAVE(DLADDR)
57-
#include <cxxabi.h>
58-
#include <dlfcn.h>
59-
diff -aur download/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp
60-
--- download/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2014-03-15 06:08:27.000000000 +0200
61-
+++ target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2018-06-14 15:41:18.000000000 +0300
62-
@@ -28,12 +28,13 @@
63-
64-
#include "config.h"
65-
#include "Collator.h"
66-
+#include <StringView.h>
67-
68-
#if UCONFIG_NO_COLLATION
69-
70-
namespace WTF {
71-
72-
-int Collator::collate(StringView a, StringView b) const
73-
+int Collator::collate(StringView a, StringView b)
74-
{
75-
unsigned commonLength = std::min(a.length(), b.length());
76-
for (unsigned i = 0; i < commonLength; ++i) {
77-
@@ -51,7 +52,7 @@
78-
return 0;
79-
}
80-
81-
-int Collator::collateUTF8(const char* a, const char* b) const
82-
+int Collator::collateUTF8(const char* a, const char* b)
83-
{
84-
return collate(String::fromUTF8(a), String::fromUTF8(b));
85-
}
86-
diff -aur download/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp target/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp
87-
--- download/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp 2017-09-08 02:11:21.000000000 +0300
88-
+++ target/webkit/Source/WTF/wtf/unix/LanguageUnix.cpp 2018-06-14 15:41:18.000000000 +0300
89-
@@ -24,22 +24,25 @@
90-
#include <locale.h>
91-
#include <wtf/Vector.h>
92-
#include <wtf/text/WTFString.h>
93-
+#include <sys/system_properties.h>
94-
95-
namespace WTF {
96-
97-
-// Using pango_language_get_default() here is not an option, because
98-
-// it doesn't support changing the locale in runtime, so it returns
99-
-// always the same value.
100-
static String platformLanguage()
101-
{
102-
- String localeDefault(setlocale(LC_CTYPE, nullptr));
103-
- if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX"))
104-
+ char buf[2 * (PROP_VALUE_MAX + 1)];
105-
+ int locale_len = __system_property_get("persist.sys.locale", buf);
106-
+ if (locale_len == 0) {
107-
+ int lang_len = __system_property_get("persist.sys.language", buf);
108-
+ if(lang_len == 0) {
109-
return ASCIILiteral("en-US");
110-
-
111-
- String normalizedDefault = localeDefault;
112-
- normalizedDefault.replace('_', '-');
113-
- normalizedDefault.truncate(normalizedDefault.find('.'));
114-
- return normalizedDefault;
115-
+ }
116-
+ int country_len = __system_property_get("persist.sys.country", buf + lang_len + 1);
117-
+ if(country_len != 0) {
118-
+ buf[lang_len] = '-';
119-
+ }
120-
+ }
121-
+ return String(buf);
122-
}
123-
124-
Vector<String> platformUserPreferredLanguages()
125-
diff -aur download/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp
126-
--- download/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2018-02-01 07:36:40.000000000 +0200
127-
+++ target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2018-06-14 15:41:18.000000000 +0300
128-
@@ -88,13 +88,8 @@
129-
1+
diff -aur target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp
2+
--- target-org/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-02-03 22:59:08.000000000 +0100
3+
+++ target/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp 2017-08-02 10:07:11.000383124 +0200
4+
@@ -84,13 +84,8 @@
5+
1306
void* DebugHeap::memalign(size_t alignment, size_t size, bool crashOnFailure)
1317
{
1328
- void* result;
@@ -139,11 +15,11 @@ diff -aur download/webkit/Source/bmalloc/bmalloc/DebugHeap.cpp target/webkit/Sou
13915
+ BCRASH();
14016
+ return nullptr;
14117
}
142-
18+
14319
void* DebugHeap::realloc(void* object, size_t size)
144-
diff -aur download/webkit/Source/cmake/FindICU.cmake target/webkit/Source/cmake/FindICU.cmake
145-
--- download/webkit/Source/cmake/FindICU.cmake 2016-11-30 20:45:57.000000000 +0200
146-
+++ target/webkit/Source/cmake/FindICU.cmake 2018-06-14 15:41:18.000000000 +0300
20+
diff -aur target-org/webkit/Source/cmake/FindICU.cmake target/webkit/Source/cmake/FindICU.cmake
21+
--- target-org/webkit/Source/cmake/FindICU.cmake 2016-11-30 19:45:57.000000000 +0100
22+
+++ target/webkit/Source/cmake/FindICU.cmake 2017-07-11 11:34:55.962374878 +0200
14723
@@ -25,7 +25,7 @@
14824
# Look for the library.
14925
find_library(
@@ -171,22 +47,10 @@ diff -aur download/webkit/Source/cmake/FindICU.cmake target/webkit/Source/cmake/
17147
HINTS ${PC_ICU_I18N_LIBRARY_DIRS}
17248
${PC_ICU_I18N_LIBDIR}
17349
${WEBKIT_LIBRARIES_LINK_DIR}
174-
diff -aur download/webkit/Source/cmake/OptionsCommon.cmake target/webkit/Source/cmake/OptionsCommon.cmake
175-
--- download/webkit/Source/cmake/OptionsCommon.cmake 2018-05-10 02:58:49.000000000 +0300
176-
+++ target/webkit/Source/cmake/OptionsCommon.cmake 2018-06-14 15:41:18.000000000 +0300
177-
@@ -141,7 +141,7 @@
178-
179-
# Check for headers
180-
_HAVE_CHECK_INCLUDE(HAVE_ERRNO_H errno.h)
181-
-_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
182-
+#_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
183-
_HAVE_CHECK_INCLUDE(HAVE_MMAP sys/mman.h)
184-
_HAVE_CHECK_INCLUDE(HAVE_PTHREAD_NP_H pthread_np.h)
185-
_HAVE_CHECK_INCLUDE(HAVE_STRINGS_H strings.h)
186-
diff -aur download/webkit/Source/cmake/OptionsJSCOnly.cmake target/webkit/Source/cmake/OptionsJSCOnly.cmake
187-
--- download/webkit/Source/cmake/OptionsJSCOnly.cmake 2018-06-11 12:03:46.000000000 +0300
188-
+++ target/webkit/Source/cmake/OptionsJSCOnly.cmake 2018-06-14 15:41:18.000000000 +0300
189-
@@ -35,12 +35,11 @@
50+
diff -aur target-org/webkit/Source/cmake/OptionsJSCOnly.cmake target/webkit/Source/cmake/OptionsJSCOnly.cmake
51+
--- target-org/webkit/Source/cmake/OptionsJSCOnly.cmake 2017-04-17 15:51:21.000000000 +0200
52+
+++ target/webkit/Source/cmake/OptionsJSCOnly.cmake 2017-07-11 11:34:55.962374878 +0200
53+
@@ -34,12 +34,11 @@
19054
set(ENABLE_WEBCORE OFF)
19155
set(ENABLE_WEBKIT_LEGACY OFF)
19256
set(ENABLE_WEBKIT OFF)
@@ -201,6 +65,122 @@ diff -aur download/webkit/Source/cmake/OptionsJSCOnly.cmake target/webkit/Source
20165
+set(ENABLE_DFG_JIT OFF)
20266
+set(ENABLE_FTL_JIT OFF)
20367
+set(ENABLE_JIT ON)
204-
68+
20569
if (WTF_CPU_X86 OR WTF_CPU_X86_64)
20670
SET_AND_EXPOSE_TO_BUILD(USE_UDIS86 1)
71+
diff -aur target-org/webkit/Source/JavaScriptCore/CMakeLists.txt target/webkit/Source/JavaScriptCore/CMakeLists.txt
72+
--- target-org/webkit/Source/JavaScriptCore/CMakeLists.txt 2017-05-02 21:13:03.000000000 +0200
73+
+++ target/webkit/Source/JavaScriptCore/CMakeLists.txt 2017-07-11 11:34:55.962374878 +0200
74+
@@ -1543,7 +1543,7 @@
75+
76+
target_include_directories(LLIntOffsetsExtractor PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES})
77+
78+
-add_subdirectory(shell)
79+
+# add_subdirectory(shell)
80+
81+
WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
82+
WEBKIT_FRAMEWORK(JavaScriptCore)
83+
@@ -1555,6 +1555,7 @@
84+
install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
85+
endif ()
86+
endif ()
87+
+set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME jsc)
88+
89+
# Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
90+
91+
diff -aur target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp
92+
--- target-org/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2016-10-08 05:31:15.000000000 +0200
93+
+++ target/webkit/Source/WTF/wtf/PlatformUserPreferredLanguagesUnix.cpp 2017-07-11 11:34:55.962374878 +0200
94+
@@ -24,24 +24,29 @@
95+
#include <locale.h>
96+
#include <wtf/Vector.h>
97+
#include <wtf/text/WTFString.h>
98+
+#include <sys/system_properties.h>
99+
100+
namespace WTF {
101+
102+
void setPlatformUserPreferredLanguagesChangedCallback(void (*)()) { }
103+
104+
-// Using pango_language_get_default() here is not an option, because
105+
-// it doesn't support changing the locale in runtime, so it returns
106+
-// always the same value.
107+
static String platformLanguage()
108+
{
109+
- String localeDefault(setlocale(LC_CTYPE, nullptr));
110+
- if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX"))
111+
+ char buf[2 * (PROP_VALUE_MAX + 1)];
112+
+
113+
+ int locale_len = __system_property_get("persist.sys.locale", buf);
114+
+ if (locale_len == 0) {
115+
+ int lang_len = __system_property_get("persist.sys.language", buf);
116+
+ if(lang_len == 0) {
117+
return ASCIILiteral("en-US");
118+
+ }
119+
+ int country_len = __system_property_get("persist.sys.country", buf + lang_len + 1);
120+
+ if(country_len != 0) {
121+
+ buf[lang_len] = '-';
122+
+ }
123+
+ }
124+
125+
- String normalizedDefault = localeDefault;
126+
- normalizedDefault.replace('_', '-');
127+
- normalizedDefault.truncate(normalizedDefault.find('.'));
128+
- return normalizedDefault;
129+
+ return String(buf);
130+
}
131+
132+
Vector<String> platformUserPreferredLanguages()
133+
diff -aur target-org/webkit/Source/WTF/wtf/StackTrace.cpp target/webkit/Source/WTF/wtf/StackTrace.cpp
134+
--- target-org/webkit/Source/WTF/wtf/StackTrace.cpp 2017-04-25 04:53:49.000000000 +0200
135+
+++ target/webkit/Source/WTF/wtf/StackTrace.cpp 2017-07-11 11:34:55.962374878 +0200
136+
@@ -30,10 +30,6 @@
137+
#include <wtf/Assertions.h>
138+
#include <wtf/PrintStream.h>
139+
140+
-#if HAVE(BACKTRACE_SYMBOLS) || HAVE(BACKTRACE)
141+
-#include <execinfo.h>
142+
-#endif
143+
-
144+
#if HAVE(DLADDR)
145+
#include <cxxabi.h>
146+
#include <dlfcn.h>
147+
diff -aur target-org/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp
148+
--- target-org/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2014-03-15 05:08:27.000000000 +0100
149+
+++ target/webkit/Source/WTF/wtf/unicode/CollatorDefault.cpp 2017-07-11 11:36:01.845264855 +0200
150+
@@ -28,12 +28,13 @@
151+
152+
#include "config.h"
153+
#include "Collator.h"
154+
+#include <StringView.h>
155+
156+
#if UCONFIG_NO_COLLATION
157+
158+
namespace WTF {
159+
160+
-int Collator::collate(StringView a, StringView b) const
161+
+int Collator::collate(StringView a, StringView b)
162+
{
163+
unsigned commonLength = std::min(a.length(), b.length());
164+
for (unsigned i = 0; i < commonLength; ++i) {
165+
@@ -51,7 +52,7 @@
166+
return 0;
167+
}
168+
169+
-int Collator::collateUTF8(const char* a, const char* b) const
170+
+int Collator::collateUTF8(const char* a, const char* b)
171+
{
172+
return collate(String::fromUTF8(a), String::fromUTF8(b));
173+
}
174+
diff -aur org/target/webkit/Source/cmake/OptionsCommon.cmake target/webkit/Source/cmake/OptionsCommon.cmake
175+
--- target-org/webkit/Source/cmake/OptionsCommon.cmake 2017-11-15 16:28:52.120093206 +0100
176+
+++ target/webkit/Source/cmake/OptionsCommon.cmake 2017-04-09 02:50:32.875166000 +0200
177+
@@ -255,7 +255,7 @@
178+
179+
# Check for headers
180+
_HAVE_CHECK_INCLUDE(HAVE_ERRNO_H errno.h)
181+
-_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
182+
+#_HAVE_CHECK_INCLUDE(HAVE_LANGINFO_H langinfo.h)
183+
_HAVE_CHECK_INCLUDE(HAVE_MMAP sys/mman.h)
184+
_HAVE_CHECK_INCLUDE(HAVE_PTHREAD_NP_H pthread_np.h)
185+
_HAVE_CHECK_INCLUDE(HAVE_STRINGS_H strings.h)
186+

scripts/compile/jsc.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ source $SCRIPT_DIR/common.sh
66
CMAKE_FOLDER=$(cd $ANDROID_HOME/cmake && ls -1 | sort -r | head -1)
77
PATH=$TOOLCHAIN_DIR/bin:$ANDROID_HOME/cmake/$CMAKE_FOLDER/bin/:$PATH
88

9+
# conditional patch
10+
if ! [[ $ENABLE_INTL ]]; then
11+
patch -d $TARGETDIR -N -p1 < $ROOTDIR/patches/intl/icu-disabled.patch
12+
fi
13+
914
rm -rf $TARGETDIR/webkit/$CROSS_COMPILE_PLATFORM-${FLAVOR}
1015
rm -rf $TARGETDIR/webkit/WebKitBuild
1116
cd $TARGETDIR/webkit/Tools/Scripts
@@ -56,3 +61,9 @@ $TARGETDIR/webkit/Tools/Scripts/build-webkit \
5661
cp $TARGETDIR/webkit/WebKitBuild/Release/lib/libjsc.so $INSTALL_DIR
5762
mv $TARGETDIR/webkit/WebKitBuild $TARGETDIR/webkit/${CROSS_COMPILE_PLATFORM}-${FLAVOR}
5863
cp $TOOLCHAIN_LINK_DIR/libc++_shared.so $INSTALL_DIR
64+
65+
# conditional patch undo
66+
cd $ROOTDIR
67+
if ! [[ $ENABLE_INTL ]]; then
68+
patch -d $TARGETDIR -p1 -R < $ROOTDIR/patches/intl/icu-disabled.patch
69+
fi

scripts/prep.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ cd $ROOTDIR
1919

2020
echo "=============== patch jsc ====================="
2121
patch -d $TARGETDIR -p1 < $ROOTDIR/patches/jsc.patch
22-
echo "rejects: $(find $ROOTDIR/build/target | grep \.orig || true)"

0 commit comments

Comments
 (0)