llvm-flang: Only build offload code if cuda enabled (#17466)
* llvm-flang Only build offload code if cuda enabled The current version executes `cmake(*args)` always as part of the post install. If device offload is not part of the build, this results in referencing `args` without it being set and the error: ``` ==> Error: UnboundLocalError: local variable 'args' referenced before assignment ``` Looking at prevoous version of `llvm-package.py` this whole routine appears to be only required for offload, some indent `cmake/make/install` to be under the `if`. * Update package.py Add comment
This commit is contained in:
parent
5e50dc5acb
commit
9629f571bc
1 changed files with 4 additions and 3 deletions
|
@ -238,6 +238,7 @@ def post_install(self):
|
|||
spec['libelf'].prefix.include,
|
||||
spec['hwloc'].prefix.include))
|
||||
|
||||
# Only build if offload target.
|
||||
cmake(*args)
|
||||
make()
|
||||
make('install')
|
||||
|
|
Loading…
Reference in a new issue