update Clang-AOMP easyblock for ROCm 5.6 + consider both $EBROOTGCC and $EBROOTGCCCORE to specify -DGCC_INSTALL_PREFIX#2958
Conversation
| "-DLLVM_ENABLE_PROJECTS='clang;lld;compiler-rt'", | ||
| "-DCLANG_DEFAULT_LINKER=lld", | ||
| "-DGCC_INSTALL_PREFIX=$EBROOTGCC", | ||
| "-DGCC_INSTALL_PREFIX=$EBROOTGCCCORE", |
There was a problem hiding this comment.
@akesandgren Don't we want to consider both?
How about using a construct like: ${EBROOTGCC:-${EBROOTGCCCORE}}, to use $EBROOTGCCCORE as a fallback if $EBROOTGCC is not defined? (or other way around, not sure what is better)
There was a problem hiding this comment.
Ahh, forgot about that one...
${EBROOTGCC:-${EBROOTGCCCORE}} is probably better, or pick up on it in python code first with getenv(...)
On the other hand, GCCCORE will be there and is the actual GCC compiler...
There was a problem hiding this comment.
If ${EBROOTGCC} is set, it should also point to the installation prefix of the actual compiler, because we use altroot = 'GCCcore' in the GCC easyconfigs.
Picking up the value with os.getenv is probably better, since it makes the command being run more explicit (you don't need to go and figure out what $EBROOTGCCCORE is set to when that command is being run
There was a problem hiding this comment.
Since Clang-AOMP is at GCCcore level picking up os.getenv('EBROOTGCCCORE') should be enough, but should we protect against someone trying to use this on some completely different base toolchain?
There was a problem hiding this comment.
@boegel any more thoughts on this before I change this to use os.getenv instead of $EBROOT...
There was a problem hiding this comment.
@akesandgren Yes, we should, we should consider both $EBROOTGCC and $EBROOTGCCCORE, as suggested.
If we want to make this backwards compatible, we should consider $EBROOTGCC first, and only pick up on $EBROOTGCCCORE if $EBROOTGCC is not defined.
|
@boegel So this should do then? |
|
Test report by @akesandgren Overview of tested easyconfigs (in order)
Build succeeded for 3 out of 3 (3 easyconfigs in total) |
$EBROOTGCC and $EBROOTGCCCORE to specify -DGCC_INSTALL_PREFIX
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
(created using
eb --new-pr)