Skip to content

Commit a8e53f2

Browse files
authored
Merge branch 'HaxeFoundation:master' into patch-2
2 parents df1abba + 1618253 commit a8e53f2

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

src/String.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,7 +1380,7 @@ Dynamic String::charCodeAt(int inPos) const
13801380

13811381
String String::fromCharCode( int c )
13821382
{
1383-
if (c<=255)
1383+
if (0<=c && c<=255)
13841384
{
13851385
return sConstStrings[c];
13861386
}

toolchain/android-toolchain-clang.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@
8989
<!-- Build time error, not run time -->
9090
<flag value="-Wl,--no-undefined" unless="HXCPP_ALLOW_UNDEFINED" />
9191

92+
<!-- Disable 16KB page alignment workaround when explicitly requested -->
93+
<section unless="HXCPP_ANDROID_NO_16K_PAGES">
94+
<!-- Enable 16KB page size for NDK r27 and below -->
95+
<flag value="-Wl,-z,max-page-size=16384" unless="NDKV28+" />
96+
97+
<!-- Extra 16KB alignment workaround for NDK r22 and below -->
98+
<flag value="-Wl,-z,common-page-size=16384" unless="NDKV23+" />
99+
</section>
100+
92101
<flag value="-stdlib=libc++" unless="NDKV20+" />
93102
<flag value ="-static-libstdc++" />
94103
<!-- This shows the android link line, which may be so long that it breaks the tool

toolchain/android-toolchain-gcc.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@
178178
</section>
179179
<flag value="-Wl,--no-undefined" unless="dll_import" />
180180
<flag value="-Wl,--unresolved-symbols=ignore-in-object-files" if="dll_import" />
181+
<section unless="HXCPP_ANDROID_NO_16K_PAGES">
182+
<flag value="-Wl,-z,max-page-size=16384" />
183+
<flag value="-Wl,-z,common-page-size=16384" />
184+
</section>
181185
<flag value="-Wl,-z,noexecstack"/>
182186
<flag value="--sysroot=${ANDROID_NDK_ROOT}/platforms/${PLATFORM}/${PLATFORM_ARCH}"/>
183187
<flag value="-L${ANDROID_NDK_ROOT}/platforms/${PLATFORM}/${PLATFORM_ARCH}/usr/lib"/>
@@ -217,6 +221,10 @@
217221
<flag value="-std=c++11" if="HXCPP_CPP11"/>
218222
<flag value="-Wl,--no-undefined" unless="dll_import" />
219223
<flag value="-Wl,--unresolved-symbols=ignore-in-object-files" if="dll_import" />
224+
<section unless="HXCPP_ANDROID_NO_16K_PAGES">
225+
<flag value="-Wl,-z,max-page-size=16384" />
226+
<flag value="-Wl,-z,common-page-size=16384" />
227+
</section>
220228
<flag value="-Wl,-z,noexecstack"/>
221229
<flag value="--sysroot=${ANDROID_NDK_ROOT}/platforms/${PLATFORM}/${PLATFORM_ARCH}"/>
222230
<flag value="-L${ANDROID_NDK_ROOT}/platforms/${PLATFORM}/${PLATFORM_ARCH}/usr/lib"/>

0 commit comments

Comments
 (0)