Add a symbol suffix option to LLVM (#27445)

This commit is contained in:
Harmen Stoppels 2021-11-16 15:06:07 +01:00 committed by GitHub
parent bb54e9a4be
commit a780f96a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,6 +154,8 @@ class Llvm(CMakePackage, CudaPackage):
description="Enable code-signing on macOS")
variant("python", default=False, description="Install python bindings")
variant('version_suffix', default='none', description="Add a symbol suffix")
extends("python", when="+python")
# Build dependency
@ -469,6 +471,10 @@ def cmake_args(self):
define("LIBOMP_HWLOC_INSTALL_DIR", spec["hwloc"].prefix),
]
version_suffix = spec.variants['version_suffix'].value
if version_suffix != 'none':
cmake_args.append(define('LLVM_VERSION_SUFFIX', version_suffix))
if python.version >= Version("3"):
cmake_args.append(define("Python3_EXECUTABLE", python.command.path))
else: