diff options
| author | Marius Bakke <marius@gnu.org> | 2020-10-21 21:23:24 +0200 |
|---|---|---|
| committer | Marius Bakke <marius@gnu.org> | 2020-10-22 18:41:29 +0200 |
| commit | f91046ce67fcf75183c749fec7dc603d5eba8838 (patch) | |
| tree | 5793af0f3c1dde781124143e9dfd83bb39fd22cb /gnu | |
| parent | a45071978c25d4c3d66e0798b6b28fc0ce7756af (diff) | |
gnu: clang@10, clang@11: Fix CMake files.
* gnu/packages/llvm.scm (clang-from-llvm): Add phase adjust-cmake-file when
building Clang 10 or later.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/llvm.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index c500430dd5c..eb93433c5bf 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm | |||
| @@ -326,6 +326,27 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to the | |||
| 326 | (("@GLIBC_LIBDIR@") | 326 | (("@GLIBC_LIBDIR@") |
| 327 | (string-append libc "/lib")))))) | 327 | (string-append libc "/lib")))))) |
| 328 | #t))) | 328 | #t))) |
| 329 | ,@(if (version>=? version "10") | ||
| 330 | `((add-after 'install 'adjust-cmake-file | ||
| 331 | (lambda* (#:key outputs #:allow-other-keys) | ||
| 332 | (let ((out (assoc-ref outputs "out"))) | ||
| 333 | ;; Clang generates a CMake file with "targets" | ||
| 334 | ;; for each installed library file. Downstream | ||
| 335 | ;; consumers of the CMake interface can use this | ||
| 336 | ;; to get absolute library locations. Including | ||
| 337 | ;; this file will needlessly assert that _all_ | ||
| 338 | ;; libraries are available, which causes problems | ||
| 339 | ;; in Guix because some are removed (see the | ||
| 340 | ;; move-extra-tools phase). Thus, remove the | ||
| 341 | ;; asserts so that the main functionality works. | ||
| 342 | (substitute* | ||
| 343 | (string-append | ||
| 344 | out | ||
| 345 | "/lib/cmake/clang/ClangTargets-release.cmake") | ||
| 346 | (("list\\(APPEND _IMPORT_CHECK_TARGETS.*" all) | ||
| 347 | (string-append "# Disabled by Guix.\n#" all))) | ||
| 348 | #t)))) | ||
| 349 | '()) | ||
| 329 | ,@(if (version>? version "3.8") | 350 | ,@(if (version>? version "3.8") |
| 330 | `((add-after 'install 'symlink-cfi_blacklist | 351 | `((add-after 'install 'symlink-cfi_blacklist |
| 331 | (lambda* (#:key inputs outputs #:allow-other-keys) | 352 | (lambda* (#:key inputs outputs #:allow-other-keys) |
