nvhpc: Do not use -Wno-error with nvhpc#44142
Conversation
|
@William-Mou @msimberg: does this fix the |
061f71d to
b816c86
Compare
|
@tgamblin I can confirm this works for NVHPC, thanks! For what it's worth, it seems like NVHPC actually learned the ? |
|
Hi @tgamblin and @adamjstewart Thank you very much, I think this is very helpful! As @msimberg mentioned, |
|
It looks like it learned |
b816c86 to
e6bf86e
Compare
|
Ok I updated this to handle what I think are all the ways |
adamjstewart
left a comment
There was a problem hiding this comment.
Don't want to derail this by proposing a bigger refactor, but I wonder if we should instead name this according to "when to replace", not "when not to replace".
We had a big debate about this when we did it. By default we filter out I don't think it's worth inverting the sense of this, especially now that it's been in Spack a while -- while it might make the logic for this one function simpler, it will make packages more complicated. |
In #30882, we made Spack ignore `-Werror` calls so that it could more easily build projects that inject `-Werror` into their builds. We did this by translating them to `-Wno-error` in the compiler wrapper. However, some compilers (like `nvhpc`) do not support `-Wno-error`. We need to exclude them from this feature until they do. - [x] make a property on `PackageBase` for `keep_werror` that knows not to use it for `nvhpc`. - [x] update property so that it keeps only the specific `-Werror=...` args for newer nvhpc's, which support `-Wno-error` but not `-Wno-error=...` Co-authored-by: William Mou <[email protected]>
e6bf86e to
14befaf
Compare
trws
left a comment
There was a problem hiding this comment.
Looks good to me, possibly pending the comment noted above.
Co-authored-by: Tom Scogland <[email protected]>
In spack#30882, we made Spack ignore `-Werror` calls so that it could more easily build projects that inject `-Werror` into their builds. We did this by translating them to `-Wno-error` in the compiler wrapper. However, some compilers (like `nvhpc`) do not support `-Wno-error`. We need to exclude them from this feature until they do. - [x] make a property on `PackageBase` for `keep_werror` that knows not to use it for `nvhpc`. - [x] update property so that it keeps only the specific `-Werror=...` args for newer nvhpc's, which support `-Wno-error` but not `-Wno-error=...` --------- Co-authored-by: William Mou <[email protected]> Co-authored-by: Tom Scogland <[email protected]> Signed-off-by: Todd Gamblin <[email protected]>
In spack#30882, we made Spack ignore `-Werror` calls so that it could more easily build projects that inject `-Werror` into their builds. We did this by translating them to `-Wno-error` in the compiler wrapper. However, some compilers (like `nvhpc`) do not support `-Wno-error`. We need to exclude them from this feature until they do. - [x] make a property on `PackageBase` for `keep_werror` that knows not to use it for `nvhpc`. - [x] update property so that it keeps only the specific `-Werror=...` args for newer nvhpc's, which support `-Wno-error` but not `-Wno-error=...` --------- Co-authored-by: William Mou <[email protected]> Co-authored-by: Tom Scogland <[email protected]> Signed-off-by: Todd Gamblin <[email protected]>
Closes #36961.
Closes #35235.
In #30882, we made Spack ignore
-Werrorcalls so that it could more easily build projects that inject-Werrorinto their builds. We did this by translating them to-Wno-errorin the compiler wrapper. However, some compilers (likenvhpc) do not support-Wno-error. We need to exclude them from this feature until they do.PackageBaseforkeep_werrorthat knows not to use it fornvhpc.