-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to LLVM 13 #7627
Update to LLVM 13 #7627
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,17 +2,16 @@ TERMUX_PKG_HOMEPAGE=https://clang.llvm.org/ | |
TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library" | ||
TERMUX_PKG_LICENSE="NCSA" | ||
TERMUX_PKG_MAINTAINER="@buttaface" | ||
TERMUX_PKG_VERSION=12.0.1 | ||
TERMUX_PKG_REVISION=1 | ||
TERMUX_PKG_SHA256=129cb25cd13677aad951ce5c2deb0fe4afc1e9d98950f53b51bdcfb5a73afa0e | ||
TERMUX_PKG_VERSION=13.0.0 | ||
TERMUX_PKG_SHA256=6075ad30f1ac0e15f07c1bf062c1e1268c241d674f11bd32cdf0e040c71f2bf3 | ||
TERMUX_PKG_SRCURL=https://github.com/llvm/llvm-project/releases/download/llvmorg-$TERMUX_PKG_VERSION/llvm-project-$TERMUX_PKG_VERSION.src.tar.xz | ||
TERMUX_PKG_HOSTBUILD=true | ||
TERMUX_PKG_RM_AFTER_INSTALL=" | ||
bin/ld64.lld.darwinnew | ||
bin/ld64.lld.darwin* | ||
lib/libgomp.a | ||
lib/libiomp5.a | ||
" | ||
TERMUX_PKG_DEPENDS="binutils, libc++, ncurses, ndk-sysroot, libffi, zlib, libxml2" | ||
TERMUX_PKG_DEPENDS="libc++, ncurses, libffi, zlib, libxml2" | ||
# Replace gcc since gcc is deprecated by google on android and is not maintained upstream. | ||
# Conflict with clang versions earlier than 3.9.1-3 since they bundled llvm. | ||
TERMUX_PKG_CONFLICTS="gcc, clang (<< 3.9.1-3)" | ||
|
@@ -27,16 +26,17 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" | |
-DLLVM_ENABLE_LIBEDIT=OFF | ||
-DLLVM_INCLUDE_TESTS=OFF | ||
-DCLANG_DEFAULT_CXX_STDLIB=libc++ | ||
-DCLANG_DEFAULT_LINKER=lld | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changing the default linker on all arches to lld, as done with NDK 23. |
||
-DCLANG_INCLUDE_TESTS=OFF | ||
-DCLANG_TOOL_C_INDEX_TEST_BUILD=OFF | ||
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=ON | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found the fix, I think arm will still fail for a different reason. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, nice fix, better than having to hack the cmake file! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Seems like you have forgotten the fact that hacking related discussions are forbidden here, whether it be hacking Termux or cmake 😉 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thunder-coding the original meaning of hacking should still be fine ;) |
||
-DDEFAULT_SYSROOT=$(dirname $TERMUX_PREFIX) | ||
-DLLVM_LINK_LLVM_DYLIB=ON | ||
-DLLDB_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/lldb-tblgen | ||
-DLLVM_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/llvm-tblgen | ||
-DCLANG_TABLEGEN=$TERMUX_PKG_HOSTBUILD_DIR/bin/clang-tblgen | ||
-DLIBOMP_ENABLE_SHARED=FALSE | ||
-DOPENMP_ENABLE_LIBOMPTARGET=OFF | ||
-DLLVM_BINUTILS_INCDIR=$TERMUX_PREFIX/include | ||
-DLLVM_ENABLE_SPHINX=ON | ||
-DSPHINX_OUTPUT_MAN=ON | ||
-DSPHINX_WARNINGS_AS_ERRORS=OFF | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Something changed between clang 9 in NDK 21d and clang 12 in NDK 23, where we have to pass | ||
this flag now. | ||
|
||
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt | ||
index 59d83631a5f4..561384460d85 100644 | ||
--- a/compiler-rt/lib/builtins/CMakeLists.txt | ||
+++ b/compiler-rt/lib/builtins/CMakeLists.txt | ||
@@ -729,8 +729,8 @@ else () | ||
|
||
# Needed for clear_cache on debug mode, due to r7's usage in inline asm. | ||
# Release mode already sets it via -O2/3, Debug mode doesn't. | ||
- if (${arch} STREQUAL "armhf") | ||
- list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) | ||
+ if (${arch} STREQUAL "arm") | ||
+ list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer)# -DCOMPILER_RT_ARMHF_TARGET) | ||
endif() | ||
|
||
# For RISCV32, we must force enable int128 for compiling long |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
TERMUX_SUBPKG_INCLUDE=" | ||
include/lld/ | ||
lib/cmake/lld/ | ||
lib/liblld*.a | ||
bin/ld.lld | ||
bin/ld64.lld | ||
bin/lld | ||
bin/lld-link | ||
bin/ld.lld | ||
bin/wasm-ld | ||
bin/ld64.lld | ||
include/lld/ | ||
lib/cmake/lld/ | ||
lib/liblld*.a | ||
" | ||
TERMUX_SUBPKG_DESCRIPTION="LLVM-based linker" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
lldb wants to serialize a FILE, so pass it the header with the size now that it's an opaque | ||
struct. | ||
|
||
diff --git a/lldb/source/API/SBReproducerPrivate.h b/lldb/source/API/SBReproducerPrivate.h | ||
index 02ac31c2ad89..0ec65e63fffe 100644 | ||
--- a/lldb/source/API/SBReproducerPrivate.h | ||
+++ b/lldb/source/API/SBReproducerPrivate.h | ||
@@ -19,6 +19,7 @@ | ||
#include "lldb/Utility/ReproducerProvider.h" | ||
|
||
#include "llvm/ADT/DenseMap.h" | ||
+#include <bits/struct_file.h> | ||
|
||
#define LLDB_GET_INSTRUMENTATION_DATA() \ | ||
lldb_private::repro::InstrumentationData::Instance() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two packages are really dependencies of the compiler. I can keep them here if moving them will break things though, @Grimler91, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xeffyr, any opinion on moving these package dependencies to clang?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, binutils and ndk-sysroot are dependencies of clang.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm more worried about dependency breakages similar to this, 39dec01, since I'm not sure how dpkg will handle moving these. Any concern about that, @xeffyr?