diff --git a/package/llvm-project/llvm/Config.in b/package/llvm-project/llvm/Config.in index ebb0fca66a..4ee84b3bcc 100644 --- a/package/llvm-project/llvm/Config.in +++ b/package/llvm-project/llvm/Config.in @@ -57,6 +57,12 @@ config BR2_PACKAGE_LLVM_BPF Build BPF target. Select this option if you are going to install bcc on the target. +config BR2_PACKAGE_LLVM_DUMP + bool "enable dump" + help + Build LLVM with dump functions even when assertions are + disabled. + endif comment "llvm needs a toolchain w/ wchar, threads, C++, gcc >= 7, dynamic library, host gcc >= 7" diff --git a/package/llvm-project/llvm/llvm.mk b/package/llvm-project/llvm/llvm.mk index 556a2f8c35..6598d8b6c1 100644 --- a/package/llvm-project/llvm/llvm.mk +++ b/package/llvm-project/llvm/llvm.mk @@ -228,6 +228,13 @@ HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=OFF LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=OFF endif +HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_DUMP=OFF +ifeq ($(BR2_PACKAGE_LLVM_DUMP),y) +LLVM_CONF_OPTS += -DLLVM_ENABLE_DUMP=ON +else +LLVM_CONF_OPTS += -DLLVM_ENABLE_DUMP=OFF +endif + # Compiler-rt not in the source tree. # llvm runtime libraries are not in the source tree. # Polly is not in the source tree.