mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 11:29:59 +01:00
gnu: llvm-17: Fix cross-building.
* gnu/packages/llvm.scm (llvm-17)[arguments]: When cross-building use an updated set of configure-flags. Change-Id: Icbb51b26de24818532c2f0f8e4cf4c4ff0664092
This commit is contained in:
parent
8ff7139d6e
commit
2d1fda2ca9
1 changed files with 24 additions and 0 deletions
|
@ -1498,6 +1498,30 @@ Library.")
|
|||
(source (llvm-monorepo version))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments llvm-15)
|
||||
((#:modules modules '((guix build cmake-build-system)
|
||||
(guix build utils)))
|
||||
(if (%current-target-system)
|
||||
`((ice-9 regex)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26)
|
||||
,@modules)
|
||||
modules))
|
||||
((#:configure-flags cf #~'())
|
||||
(if (%current-target-system)
|
||||
;; Use a newer version of llvm-tblgen and add the new
|
||||
;; configure-flag needed for cross-building.
|
||||
#~(cons* (string-append "-DLLVM_TABLEGEN="
|
||||
#+(file-append this-package
|
||||
"/bin/llvm-tblgen"))
|
||||
(string-append "-DLLVM_NATIVE_TOOL_DIR="
|
||||
#+(file-append this-package "/bin"))
|
||||
(string-append "-DLLVM_HOST_TRIPLE="
|
||||
#$(%current-target-system))
|
||||
(remove
|
||||
(cut string-match
|
||||
"-DLLVM_(DEFAULT_TARGET|TARGET_ARCH|TABLEGEN).*" <>)
|
||||
#$cf))
|
||||
cf))
|
||||
;; The build daemon goes OOM on i686-linux on this phase.
|
||||
((#:phases phases #~'%standard-phases)
|
||||
(if (target-x86-32?)
|
||||
|
|
Loading…
Add table
Reference in a new issue