all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#55057] [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI.
@ 2022-04-21 20:09 Greg Hogan
  2022-09-01 21:05 ` bug#55057: " Marius Bakke
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Hogan @ 2022-04-21 20:09 UTC (permalink / raw)
  To: 55057


[-- Attachment #1.1: Type: text/plain, Size: 2627 bytes --]

The llvm packages currently define LLVM_REQUIRES_RTTI rather than the
LLVM_ENABLE_RTTI flag specified in the LLVM documentation (
https://llvm.org/docs/CMake.html).

LLVM_REQUIRES_RTTI is noted as an internal flag in the llvm code (
https://github.com/llvm/llvm-project/blob/llvmorg-14.0.1/llvm/cmake/modules/AddLLVM.cmake#L15
).

This appears to have been an issue from the first Guix commit adding the
LLVM_REQUIRES_RTTI flag as LLVM_ENABLE_RTTI is the flag specified in the
documentation for llvm 3.8.1 (
https://releases.llvm.org/3.8.1/docs/CMake.html).
$ git show 83c49858b518b98f88db5f50ce36c19084e7ad62:gnu/packages/llvm.scm

LLVM_ENABLE_RTTI is propagated to the exported llvm library cmake
configuration.
$ grep RTTI /gnu/store/*-llvm-*/lib/cmake/llvm/LLVMConfig.cmake

With all llvm packages inheriting from llvm-14 or llvm-12 this patch must
go to core-updates.
$ ./pre-inst-env guix search llvm | recsel -C -P version -e "name = 'llvm'"
| awk '$0="llvm@"$0' | xargs ./pre-inst-env guix refresh -l
Building the following 4906 packages would ensure 7034 dependent packages
are rebuilt ...

Greg


From 0cd3048f15fcca774088ab4d5b97a0fdaa74652e Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Thu, 21 Apr 2022 19:13:50 +0000
Subject: [PATCH] gnu: llvm-14, llvm-12: Enable RTTI.

* gnu/packages/llvm.scm (llvm-14, llvm-12): Enable RTTI.
[arguments]<#:configure-flags>: Switch to proper CMake flag.
---
 gnu/packages/llvm.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 8348638614..a93a1976b5 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -577,7 +577,7 @@ (define-public llvm-14
          "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
          "-DBUILD_SHARED_LIBS:BOOL=TRUE"
          "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-         "-DLLVM_REQUIRES_RTTI=1"       ;for some third-party utilities
+         "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ;for some third-party utilities
          "-DLLVM_INSTALL_UTILS=ON")     ;needed for rustc
       ;; Don't use '-g' during the build, to save space.
       #:build-type "Release"
@@ -711,7 +711,7 @@ (define-public llvm-12
             "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
             "-DBUILD_SHARED_LIBS:BOOL=TRUE"
             "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-            "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
+            "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ; For some third-party utilities
             "-DLLVM_INSTALL_UTILS=ON")) ; Needed for rustc.
        ;; Don't use '-g' during the build, to save space.
        #:build-type "Release"
-- 
2.35.1

[-- Attachment #1.2: Type: text/html, Size: 3531 bytes --]

[-- Attachment #2: 0001-gnu-llvm-14-llvm-12-Enable-RTTI.patch --]
[-- Type: text/x-patch, Size: 1521 bytes --]

From 0cd3048f15fcca774088ab4d5b97a0fdaa74652e Mon Sep 17 00:00:00 2001
From: Greg Hogan <code@greghogan.com>
Date: Thu, 21 Apr 2022 19:13:50 +0000
Subject: [PATCH] gnu: llvm-14, llvm-12: Enable RTTI.

* gnu/packages/llvm.scm (llvm-14, llvm-12): Enable RTTI.
[arguments]<#:configure-flags>: Switch to proper CMake flag.
---
 gnu/packages/llvm.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 8348638614..a93a1976b5 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -577,7 +577,7 @@ (define-public llvm-14
          "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
          "-DBUILD_SHARED_LIBS:BOOL=TRUE"
          "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-         "-DLLVM_REQUIRES_RTTI=1"       ;for some third-party utilities
+         "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ;for some third-party utilities
          "-DLLVM_INSTALL_UTILS=ON")     ;needed for rustc
       ;; Don't use '-g' during the build, to save space.
       #:build-type "Release"
@@ -711,7 +711,7 @@ (define-public llvm-12
             "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
             "-DBUILD_SHARED_LIBS:BOOL=TRUE"
             "-DLLVM_ENABLE_FFI:BOOL=TRUE"
-            "-DLLVM_REQUIRES_RTTI=1" ; For some third-party utilities
+            "-DLLVM_ENABLE_RTTI:BOOL=TRUE" ; For some third-party utilities
             "-DLLVM_INSTALL_UTILS=ON")) ; Needed for rustc.
        ;; Don't use '-g' during the build, to save space.
        #:build-type "Release"
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#55057: [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI.
  2022-04-21 20:09 [bug#55057] [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI Greg Hogan
@ 2022-09-01 21:05 ` Marius Bakke
  0 siblings, 0 replies; 2+ messages in thread
From: Marius Bakke @ 2022-09-01 21:05 UTC (permalink / raw)
  To: Greg Hogan, 55057-done

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Greg Hogan <code@greghogan.com> skriver:

> The llvm packages currently define LLVM_REQUIRES_RTTI rather than the
> LLVM_ENABLE_RTTI flag specified in the LLVM documentation (
> https://llvm.org/docs/CMake.html).
>
> LLVM_REQUIRES_RTTI is noted as an internal flag in the llvm code (
> https://github.com/llvm/llvm-project/blob/llvmorg-14.0.1/llvm/cmake/modules/AddLLVM.cmake#L15
> ).
>
> This appears to have been an issue from the first Guix commit adding the
> LLVM_REQUIRES_RTTI flag as LLVM_ENABLE_RTTI is the flag specified in the
> documentation for llvm 3.8.1 (
> https://releases.llvm.org/3.8.1/docs/CMake.html).
> $ git show 83c49858b518b98f88db5f50ce36c19084e7ad62:gnu/packages/llvm.scm

Good catch.  I wonder how we did not notice, apparently not many
packages depend on LLVM RTTI after all.

>>From 0cd3048f15fcca774088ab4d5b97a0fdaa74652e Mon Sep 17 00:00:00 2001
> From: Greg Hogan <code@greghogan.com>
> Date: Thu, 21 Apr 2022 19:13:50 +0000
> Subject: [PATCH] gnu: llvm-14, llvm-12: Enable RTTI.
>
> * gnu/packages/llvm.scm (llvm-14, llvm-12): Enable RTTI.
> [arguments]<#:configure-flags>: Switch to proper CMake flag.

Applied, thanks!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-01 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 20:09 [bug#55057] [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI Greg Hogan
2022-09-01 21:05 ` bug#55057: " Marius Bakke

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.