From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 1/4] package/llvm: add llvm RTTI option
Date: Sat, 5 Oct 2019 11:48:15 +0200 [thread overview]
Message-ID: <20191005094818.1956334-1-romain.naour@gmail.com> (raw)
Allow to build LLVM with run-time type information
when this feature is needed (for example) by mesa3d's
Gallium Nouveau driver or the Clover OpenCL state
tracker when llvm support is enabled in mesa3d.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: rebase the patch on master
package/llvm/Config.in | 12 ++++++++++++
package/llvm/llvm.mk | 8 ++++++++
2 files changed, 20 insertions(+)
diff --git a/package/llvm/Config.in b/package/llvm/Config.in
index 83e94660eb..4eaca3df58 100644
--- a/package/llvm/Config.in
+++ b/package/llvm/Config.in
@@ -35,6 +35,18 @@ config BR2_PACKAGE_LLVM_AMDGPU
Build AMDGPU target. Select this option if you are going
to install mesa3d with llvm and use Gallium Radeon driver.
+config BR2_PACKAGE_LLVM_RTTI
+ bool "enable rtti"
+ help
+ Build LLVM with run-time type information. LLVM can be
+ built without rtti, but turning it off rtti changes the
+ ABI of C++ programs.
+ This features is needed to build the Gallium Nouveau
+ driver or the Clover OpenCL state tracker when llvm
+ support is enabled.
+
+ https://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html
+
endif
comment "llvm needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, host gcc >= 4.8, dynamic library"
diff --git a/package/llvm/llvm.mk b/package/llvm/llvm.mk
index f14b537d94..27a9f41860 100644
--- a/package/llvm/llvm.mk
+++ b/package/llvm/llvm.mk
@@ -216,6 +216,14 @@ LLVM_CONF_OPTS += \
-DLLVM_INCLUDE_TOOLS=ON \
-DLLVM_BUILD_TOOLS=OFF
+ifeq ($(BR2_PACKAGE_LLVM_RTTI),y)
+HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON
+LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=ON
+else
+HOST_LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=OFF
+LLVM_CONF_OPTS += -DLLVM_ENABLE_RTTI=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.
--
2.23.0
next reply other threads:[~2019-10-05 9:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-05 9:48 Romain Naour [this message]
2019-10-05 9:48 ` [Buildroot] [PATCH v2 2/4] package/mesa3d: enable llvm RTTI when needed Romain Naour
2019-10-05 14:18 ` Bernd Kuhls
2019-10-05 9:48 ` [Buildroot] [PATCH v2 3/4] package/mesa3d: add xlib_libXv dependency to mesa3d xvmc Romain Naour
2019-10-05 14:18 ` Bernd Kuhls
2019-10-12 14:04 ` Bernd Kuhls
2019-10-05 9:48 ` [Buildroot] [PATCH v2 4/4] package/x11r7/xlib_libXvMC: remove xlib_libXv dependency Romain Naour
2019-10-05 14:19 ` Bernd Kuhls
2019-10-26 20:55 ` Thomas Petazzoni
2019-10-26 21:10 ` Romain Naour
2019-10-05 14:18 ` [Buildroot] [PATCH v2 1/4] package/llvm: add llvm RTTI option Bernd Kuhls
2019-10-25 19:41 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191005094818.1956334-1-romain.naour@gmail.com \
--to=romain.naour@gmail.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox