summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/julia/package.py
diff options
context:
space:
mode:
authorHarmen Stoppels <harmenstoppels@gmail.com>2022-05-25 14:42:14 +0200
committerGitHub <noreply@github.com>2022-05-25 14:42:14 +0200
commit0c9370ce722dc3b5f2c349f6d7a9f68466841783 (patch)
treeb06014dfb255707d3a01bccbc0c93062e80f281a /var/spack/repos/builtin/packages/julia/package.py
parent3620204db6014c079ae7f554e84d4eab75b75e2e (diff)
downloadspack-0c9370ce722dc3b5f2c349f6d7a9f68466841783.tar.gz
spack-0c9370ce722dc3b5f2c349f6d7a9f68466841783.tar.bz2
spack-0c9370ce722dc3b5f2c349f6d7a9f68466841783.tar.xz
spack-0c9370ce722dc3b5f2c349f6d7a9f68466841783.zip
julia: support clang, set llvm NDEBUG correctly (#30800)
Diffstat (limited to 'var/spack/repos/builtin/packages/julia/package.py')
-rw-r--r--var/spack/repos/builtin/packages/julia/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/julia/package.py b/var/spack/repos/builtin/packages/julia/package.py
index d3fbd85c7a..6ef36a421b 100644
--- a/var/spack/repos/builtin/packages/julia/package.py
+++ b/var/spack/repos/builtin/packages/julia/package.py
@@ -130,6 +130,12 @@ class Julia(MakefilePackage):
# only applied to libllvm when it's vendored by julia).
patch('revert-fix-rpath-of-libllvm.patch', when='@1.7.0:1.7')
+ # Allow build with clang.
+ patch('gcc-ifdef.patch', when='@1.7.0:1.7')
+
+ # Make sure Julia sets -DNDEBUG when including LLVM header files.
+ patch('llvm-NDEBUG.patch', when='@1.7.0:1.7')
+
def patch(self):
# The system-libwhich-libblastrampoline.patch causes a rebuild of docs as it
# touches the main Makefile, so we reset the a/m-time to doc/_build's.
@@ -215,6 +221,9 @@ class Julia(MakefilePackage):
'1' if spec.variants['precompile'].value else '0'),
]
+ options.append('USEGCC:={}'.format('1' if '%gcc' in spec else '0'))
+ options.append('USECLANG:={}'.format('1' if '%clang' in spec else '0'))
+
# libm or openlibm?
if spec.variants['openlibm'].value:
options.append('USE_SYSTEM_LIBM=0')