emscripten: update some details
* upstream now use LLVM 15, update patches * drop building libunwind until further notice * patch binaryen CMakeLists.txt * should be able to run tests now that python3 multiprocessing works
This commit is contained in:
parent
33345543a2
commit
49f4c2dbe1
15
packages/emscripten/binaryen-CMakeLists.txt.patch.diff
Normal file
15
packages/emscripten/binaryen-CMakeLists.txt.patch.diff
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -uNr binaryen/CMakeLists.txt binaryen.mod/CMakeLists.txt
|
||||||
|
--- binaryen/CMakeLists.txt 2022-02-26 23:46:13.824326901 +0800
|
||||||
|
+++ binaryen.mod/CMakeLists.txt 2022-02-27 00:20:59.532106415 +0800
|
||||||
|
@@ -317,7 +317,10 @@
|
||||||
|
add_subdirectory(test/lit)
|
||||||
|
|
||||||
|
# Configure GTest unit tests
|
||||||
|
-add_subdirectory(test/gtest)
|
||||||
|
+option(ENABLE_GTEST "Enable GTest unit tests" ON)
|
||||||
|
+if(ENABLE_GTEST)
|
||||||
|
+ add_subdirectory(test/gtest)
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
# Object files
|
||||||
|
set(binaryen_objs
|
@ -0,0 +1,28 @@
|
|||||||
|
diff -uNr binaryen/third_party/CMakeLists.txt binaryen.mod/third_party/CMakeLists.txt
|
||||||
|
--- binaryen/third_party/CMakeLists.txt 2022-02-26 23:46:14.268336047 +0800
|
||||||
|
+++ binaryen.mod/third_party/CMakeLists.txt 2022-02-27 00:30:42.657030709 +0800
|
||||||
|
@@ -2,15 +2,14 @@
|
||||||
|
add_subdirectory(llvm-project)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-include_directories(
|
||||||
|
- googletest/googletest
|
||||||
|
- googletest/googletest/include
|
||||||
|
-)
|
||||||
|
+if(ENABLE_GTEST)
|
||||||
|
+ include_directories(
|
||||||
|
+ googletest/googletest
|
||||||
|
+ googletest/googletest/include)
|
||||||
|
|
||||||
|
-add_library(gtest STATIC
|
||||||
|
- googletest/googletest/src/gtest-all.cc
|
||||||
|
-)
|
||||||
|
+ add_library(gtest STATIC
|
||||||
|
+ googletest/googletest/src/gtest-all.cc)
|
||||||
|
|
||||||
|
-add_library(gtest_main STATIC
|
||||||
|
- googletest/googletest/src/gtest_main.cc
|
||||||
|
-)
|
||||||
|
+ add_library(gtest_main STATIC
|
||||||
|
+ googletest/googletest/src/gtest_main.cc)
|
||||||
|
+endif()
|
@ -84,7 +84,7 @@ LLVM_BUILD_ARGS="
|
|||||||
-DLLVM_ENABLE_LIBEDIT=OFF
|
-DLLVM_ENABLE_LIBEDIT=OFF
|
||||||
-DLLVM_ENABLE_LIBPFM=OFF
|
-DLLVM_ENABLE_LIBPFM=OFF
|
||||||
-DLLVM_ENABLE_LIBXML2=OFF
|
-DLLVM_ENABLE_LIBXML2=OFF
|
||||||
-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;libunwind;lld
|
-DLLVM_ENABLE_PROJECTS=clang;compiler-rt;lld
|
||||||
-DLLVM_ENABLE_TERMINFO=OFF
|
-DLLVM_ENABLE_TERMINFO=OFF
|
||||||
-DLLVM_INCLUDE_EXAMPLES=OFF
|
-DLLVM_INCLUDE_EXAMPLES=OFF
|
||||||
-DLLVM_INCLUDE_TESTS=OFF
|
-DLLVM_INCLUDE_TESTS=OFF
|
||||||
@ -104,14 +104,12 @@ LLVM_BUILD_ARGS="
|
|||||||
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
|
-DCOMPILER_RT_BUILD_SANITIZERS=OFF
|
||||||
-DCOMPILER_RT_BUILD_XRAY=OFF
|
-DCOMPILER_RT_BUILD_XRAY=OFF
|
||||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF
|
-DCOMPILER_RT_INCLUDE_TESTS=OFF
|
||||||
|
|
||||||
-DLIBUNWIND_USE_COMPILER_RT=ON
|
|
||||||
"
|
"
|
||||||
|
|
||||||
# https://github.com/WebAssembly/binaryen/blob/main/CMakeLists.txt
|
# https://github.com/WebAssembly/binaryen/blob/main/CMakeLists.txt
|
||||||
BINARYEN_BUILD_ARGS="
|
BINARYEN_BUILD_ARGS="
|
||||||
-DCMAKE_BUILD_TYPE=MinSizeRel
|
|
||||||
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX/opt/emscripten-binaryen
|
-DCMAKE_INSTALL_PREFIX=$TERMUX_PREFIX/opt/emscripten-binaryen
|
||||||
|
-DENABLE_GTEST=OFF
|
||||||
"
|
"
|
||||||
|
|
||||||
termux_step_post_get_source() {
|
termux_step_post_get_source() {
|
||||||
@ -130,6 +128,11 @@ termux_step_post_get_source() {
|
|||||||
for patch in $TERMUX_PKG_BUILDER_DIR/llvm-project-*.patch.diff; do
|
for patch in $TERMUX_PKG_BUILDER_DIR/llvm-project-*.patch.diff; do
|
||||||
patch -p1 -i "$patch"
|
patch -p1 -i "$patch"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
cd "$TERMUX_PKG_CACHEDIR/binaryen-$BINARYEN_COMMIT"
|
||||||
|
for patch in $TERMUX_PKG_BUILDER_DIR/binaryen-*.patch.diff; do
|
||||||
|
patch -p1 -i "$patch"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_host_build() {
|
termux_step_host_build() {
|
||||||
@ -231,9 +234,9 @@ termux_step_make_install() {
|
|||||||
# libclang_rt.builtins-*-android.a in different paths even after adding
|
# libclang_rt.builtins-*-android.a in different paths even after adding
|
||||||
# the patches from libllvm (also which one is more correct?)
|
# the patches from libllvm (also which one is more correct?)
|
||||||
#
|
#
|
||||||
# binutils LD searches lib/clang/14.0.0/lib/linux (exist)
|
# binutils LD searches lib/clang/15.0.0/lib/linux (exist)
|
||||||
# LLVM LD.LLD searches lib/clang/14.0.0/lib/android (not exist)
|
# LLVM LD.LLD searches lib/clang/15.0.0/lib/android (not exist)
|
||||||
ln -fsT "linux" "$TERMUX_PREFIX/opt/emscripten-llvm/lib/clang/14.0.0/lib/android"
|
ln -fsT "linux" "$TERMUX_PREFIX/opt/emscripten-llvm/lib/clang/15.0.0/lib/android"
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_create_debscripts() {
|
termux_step_create_debscripts() {
|
||||||
@ -289,7 +292,6 @@ termux_step_create_debscripts() {
|
|||||||
# Steps:
|
# Steps:
|
||||||
# - pkg install emscripten-tests-third-party openjdk-17
|
# - pkg install emscripten-tests-third-party openjdk-17
|
||||||
# - cd $PREFIX/opt/emscripten
|
# - cd $PREFIX/opt/emscripten
|
||||||
# - npm ci --no-optional
|
# - npm install --no-optional
|
||||||
# - export EMCC_CORES=1
|
|
||||||
# - export EMTEST_SKIP_V8=1
|
# - export EMTEST_SKIP_V8=1
|
||||||
# - tests/runner {test_name}
|
# - tests/runner {test_name}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -uNr llvm-project/clang/lib/Driver/ToolChain.cpp llvm-project.mod/clang/lib/Driver/ToolChain.cpp
|
diff -uNr llvm-project/clang/lib/Driver/ToolChain.cpp llvm-project.mod/clang/lib/Driver/ToolChain.cpp
|
||||||
--- llvm-project/clang/lib/Driver/ToolChain.cpp 2021-11-27 10:21:24.849951600 +0800
|
--- llvm-project/clang/lib/Driver/ToolChain.cpp 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/clang/lib/Driver/ToolChain.cpp 2021-11-27 12:35:59.478509300 +0800
|
+++ llvm-project.mod/clang/lib/Driver/ToolChain.cpp 2022-02-26 20:33:29.973336795 +0800
|
||||||
@@ -403,7 +403,7 @@
|
@@ -414,7 +414,7 @@
|
||||||
case llvm::Triple::AIX:
|
case llvm::Triple::AIX:
|
||||||
return "aix";
|
return "aix";
|
||||||
default:
|
default:
|
||||||
@ -10,7 +10,7 @@ diff -uNr llvm-project/clang/lib/Driver/ToolChain.cpp llvm-project.mod/clang/lib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -941,7 +941,7 @@
|
@@ -965,7 +965,7 @@
|
||||||
|
|
||||||
switch (Type) {
|
switch (Type) {
|
||||||
case ToolChain::CST_Libcxx:
|
case ToolChain::CST_Libcxx:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp
|
diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp
|
||||||
--- llvm-project/clang/lib/Driver/ToolChains/Linux.cpp 2021-11-04 18:24:28.000000000 +0800
|
--- llvm-project/clang/lib/Driver/ToolChains/Linux.cpp 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp 2021-11-20 09:32:21.097136800 +0800
|
+++ llvm-project.mod/clang/lib/Driver/ToolChains/Linux.cpp 2022-02-26 20:33:29.977336914 +0800
|
||||||
@@ -162,8 +162,8 @@
|
@@ -162,8 +162,8 @@
|
||||||
// FIXME: This is a bit of a hack. We should really unify this code for
|
// FIXME: This is a bit of a hack. We should really unify this code for
|
||||||
// reasoning about oslibdir spellings with the lib dir spellings in the
|
// reasoning about oslibdir spellings with the lib dir spellings in the
|
||||||
@ -12,7 +12,7 @@ diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/cl
|
|||||||
return "lib32";
|
return "lib32";
|
||||||
|
|
||||||
if (Triple.getArch() == llvm::Triple::x86_64 && Triple.isX32())
|
if (Triple.getArch() == llvm::Triple::x86_64 && Triple.isX32())
|
||||||
@@ -294,7 +294,7 @@
|
@@ -291,7 +291,7 @@
|
||||||
if (Triple.getVendor() == llvm::Triple::OpenEmbedded &&
|
if (Triple.getVendor() == llvm::Triple::OpenEmbedded &&
|
||||||
Triple.isArch64Bit())
|
Triple.isArch64Bit())
|
||||||
addPathIfExists(D, SysRoot + "/usr/" + OSLibDir, Paths);
|
addPathIfExists(D, SysRoot + "/usr/" + OSLibDir, Paths);
|
||||||
@ -21,7 +21,7 @@ diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/cl
|
|||||||
addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
|
addPathIfExists(D, SysRoot + "/usr/lib/../" + OSLibDir, Paths);
|
||||||
if (IsRISCV) {
|
if (IsRISCV) {
|
||||||
StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple);
|
StringRef ABIName = tools::riscv::getRISCVABI(Args, Triple);
|
||||||
@@ -309,7 +309,7 @@
|
@@ -306,7 +306,7 @@
|
||||||
// searched.
|
// searched.
|
||||||
// FIXME: It's not clear whether we should use the driver's installed
|
// FIXME: It's not clear whether we should use the driver's installed
|
||||||
// directory ('Dir' below) or the ResourceDir.
|
// directory ('Dir' below) or the ResourceDir.
|
||||||
@ -30,7 +30,7 @@ diff -uNr llvm-project/clang/lib/Driver/ToolChains/Linux.cpp llvm-project.mod/cl
|
|||||||
// Even if OSLibDir != "lib", this is needed for Clang in the build
|
// Even if OSLibDir != "lib", this is needed for Clang in the build
|
||||||
// directory (not installed) to find libc++.
|
// directory (not installed) to find libc++.
|
||||||
addPathIfExists(D, D.Dir + "/../lib", Paths);
|
addPathIfExists(D, D.Dir + "/../lib", Paths);
|
||||||
@@ -318,7 +318,15 @@
|
@@ -315,7 +315,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
addPathIfExists(D, SysRoot + "/lib", Paths);
|
addPathIfExists(D, SysRoot + "/lib", Paths);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -uNr llvm-project/compiler-rt/CMakeLists.txt llvm-project.mod/compiler-rt/CMakeLists.txt
|
diff -uNr llvm-project/compiler-rt/CMakeLists.txt llvm-project.mod/compiler-rt/CMakeLists.txt
|
||||||
--- llvm-project/compiler-rt/CMakeLists.txt 2021-11-27 10:22:13.468604500 +0800
|
--- llvm-project/compiler-rt/CMakeLists.txt 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/compiler-rt/CMakeLists.txt 2021-11-27 12:36:17.443010100 +0800
|
+++ llvm-project.mod/compiler-rt/CMakeLists.txt 2022-02-26 20:33:34.369468491 +0800
|
||||||
@@ -201,6 +201,9 @@
|
@@ -186,6 +186,9 @@
|
||||||
elseif (FUCHSIA)
|
elseif (FUCHSIA)
|
||||||
set(${var}_LIBNAME "libc++")
|
set(${var}_LIBNAME "libc++")
|
||||||
set(${var}_INTREE 1)
|
set(${var}_INTREE 1)
|
||||||
@ -11,7 +11,7 @@ diff -uNr llvm-project/compiler-rt/CMakeLists.txt llvm-project.mod/compiler-rt/C
|
|||||||
else()
|
else()
|
||||||
set(${var}_LIBNAME "libstdc++")
|
set(${var}_LIBNAME "libstdc++")
|
||||||
set(${var}_SYSTEM 1)
|
set(${var}_SYSTEM 1)
|
||||||
@@ -215,7 +218,7 @@
|
@@ -200,7 +203,7 @@
|
||||||
# which pulls in the ABI transitively.
|
# which pulls in the ABI transitively.
|
||||||
set(SANITIZER_CXX_ABI "default" CACHE STRING
|
set(SANITIZER_CXX_ABI "default" CACHE STRING
|
||||||
"Specify C++ ABI library to use.")
|
"Specify C++ ABI library to use.")
|
||||||
@ -20,7 +20,7 @@ diff -uNr llvm-project/compiler-rt/CMakeLists.txt llvm-project.mod/compiler-rt/C
|
|||||||
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
|
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
|
||||||
handle_default_cxx_lib(SANITIZER_CXX_ABI)
|
handle_default_cxx_lib(SANITIZER_CXX_ABI)
|
||||||
|
|
||||||
@@ -526,6 +529,8 @@
|
@@ -528,6 +531,8 @@
|
||||||
list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++abi")
|
list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++abi")
|
||||||
elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
|
elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
|
||||||
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARIES)
|
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARIES)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -uNr llvm-project/compiler-rt/lib/builtins/CMakeLists.txt llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt
|
diff -uNr llvm-project/compiler-rt/lib/builtins/CMakeLists.txt llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt
|
||||||
--- llvm-project/compiler-rt/lib/builtins/CMakeLists.txt 2021-10-20 02:24:04.000000000 +0800
|
--- llvm-project/compiler-rt/lib/builtins/CMakeLists.txt 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt 2021-10-29 10:02:39.095942505 +0800
|
+++ llvm-project.mod/compiler-rt/lib/builtins/CMakeLists.txt 2022-02-26 20:33:34.373468611 +0800
|
||||||
@@ -732,6 +732,8 @@
|
@@ -738,6 +738,8 @@
|
||||||
# Release mode already sets it via -O2/3, Debug mode doesn't.
|
# Release mode already sets it via -O2/3, Debug mode doesn't.
|
||||||
if (${arch} STREQUAL "armhf")
|
if (${arch} STREQUAL "armhf")
|
||||||
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
|
list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
diff -uNr llvm-project/libunwind/CMakeLists.txt llvm-project.mod/libunwind/CMakeLists.txt
|
diff -uNr llvm-project/libunwind/CMakeLists.txt llvm-project.mod/libunwind/CMakeLists.txt
|
||||||
--- llvm-project/libunwind/CMakeLists.txt 2021-11-27 10:22:36.327950400 +0800
|
--- llvm-project/libunwind/CMakeLists.txt 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/libunwind/CMakeLists.txt 2021-11-27 12:36:37.310685400 +0800
|
+++ llvm-project.mod/libunwind/CMakeLists.txt 2022-02-26 20:33:34.373468611 +0800
|
||||||
@@ -212,6 +212,10 @@
|
@@ -222,6 +222,10 @@
|
||||||
add_compile_flags_if_supported(-Werror=return-type)
|
add_compile_flags_if_supported(-Werror=return-type)
|
||||||
|
|
||||||
if (LIBUNWIND_ENABLE_CET)
|
if (LIBUNWIND_ENABLE_CET)
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff -uNr llvm-project/libunwind/src/assembly.h llvm-project.mod/libunwind/src/assembly.h
|
|
||||||
--- llvm-project/libunwind/src/assembly.h 2021-10-01 20:31:40.000000000 +0800
|
|
||||||
+++ llvm-project.mod/libunwind/src/assembly.h 2021-10-25 01:37:06.375932899 +0800
|
|
||||||
@@ -15,7 +15,7 @@
|
|
||||||
#ifndef UNWIND_ASSEMBLY_H
|
|
||||||
#define UNWIND_ASSEMBLY_H
|
|
||||||
|
|
||||||
-#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__)
|
|
||||||
+#if (defined(__i386__) || defined(__x86_64__)) && defined(__linux__) && defined(_LIBUNWIND_USE_CET)
|
|
||||||
#include <cet.h>
|
|
||||||
#define _LIBUNWIND_CET_ENDBR _CET_ENDBR
|
|
||||||
#else
|
|
@ -1,12 +1,12 @@
|
|||||||
diff -uNr llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
|
diff -uNr llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp
|
||||||
--- llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2021-10-20 02:24:04.000000000 +0800
|
--- llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2022-02-24 01:38:33.000000000 +0800
|
||||||
+++ llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2021-10-29 10:03:12.035942481 +0800
|
+++ llvm-project.mod/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp 2022-02-26 20:36:55.959542847 +0800
|
||||||
@@ -286,7 +286,7 @@
|
@@ -286,7 +286,7 @@
|
||||||
uintptr_t SlabSize = 0;
|
uintptr_t SlabSize = 0;
|
||||||
uintptr_t CurrentSlabOffset = 0;
|
uintptr_t CurrentSlabOffset = 0;
|
||||||
SectionIDMap *SecIDMap = nullptr;
|
SectionIDMap *SecIDMap = nullptr;
|
||||||
-#if defined(__x86_64__) && defined(__ELF__)
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
||||||
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__TERMUX__)
|
||||||
unsigned UsedTLSStorage = 0;
|
unsigned UsedTLSStorage = 0;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
@ -14,8 +14,8 @@ diff -uNr llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp llvm-project.mod/l
|
|||||||
|
|
||||||
// In case the execution needs TLS storage, we define a very small TLS memory
|
// In case the execution needs TLS storage, we define a very small TLS memory
|
||||||
// area here that will be used in allocateTLSSection().
|
// area here that will be used in allocateTLSSection().
|
||||||
-#if defined(__x86_64__) && defined(__ELF__)
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
||||||
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__TERMUX__)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
alignas(16) __attribute__((visibility("hidden"), tls_model("initial-exec"),
|
alignas(16) __attribute__((visibility("hidden"), tls_model("initial-exec"),
|
||||||
used)) thread_local char LLVMRTDyldTLSSpace[16];
|
used)) thread_local char LLVMRTDyldTLSSpace[16];
|
||||||
@ -23,8 +23,8 @@ diff -uNr llvm-project/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp llvm-project.mod/l
|
|||||||
TrivialMemoryManager::allocateTLSSection(uintptr_t Size, unsigned Alignment,
|
TrivialMemoryManager::allocateTLSSection(uintptr_t Size, unsigned Alignment,
|
||||||
unsigned SectionID,
|
unsigned SectionID,
|
||||||
StringRef SectionName) {
|
StringRef SectionName) {
|
||||||
-#if defined(__x86_64__) && defined(__ELF__)
|
-#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__)
|
||||||
+#if defined(__x86_64__) && defined(__ELF__) && !defined(__TERMUX__)
|
+#if defined(__x86_64__) && defined(__ELF__) && defined(__linux__) && !defined(__TERMUX__)
|
||||||
if (Size + UsedTLSStorage > sizeof(LLVMRTDyldTLSSpace)) {
|
if (Size + UsedTLSStorage > sizeof(LLVMRTDyldTLSSpace)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user