guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55057] [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI.


From: Greg Hogan
Subject: [bug#55057] [PATCH core-updates] gnu: llvm-14, llvm-12: Enable RTTI.
Date: Thu, 21 Apr 2022 16:09:00 -0400

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: 0001-gnu-llvm-14-llvm-12-Enable-RTTI.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]