diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-05-25 14:42:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 14:42:14 +0200 |
commit | 0c9370ce722dc3b5f2c349f6d7a9f68466841783 (patch) | |
tree | b06014dfb255707d3a01bccbc0c93062e80f281a /var/spack/repos/builtin/packages/julia/package.py | |
parent | 3620204db6014c079ae7f554e84d4eab75b75e2e (diff) | |
download | spack-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.py | 9 |
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') |