papi: fix for Intel OneAPI compiler (#33225)

Without this patch one hits this error trying to compiler papi with Intel OneAPI:

icx: error: Note that use of '-g' without any optimization-level option will turn off most compiler optimizations similar to use of '-O0' [-Werror,-Wdebug-disables-optimization]

Signed-off-by: Howard Pritchard <howardp@lanl.gov>

Signed-off-by: Howard Pritchard <howardp@lanl.gov>
This commit is contained in:
Howard Pritchard 2022-10-18 11:18:04 -06:00 committed by GitHub
parent b44c83429c
commit d95f14084e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,11 @@ def setup_build_environment(self, env):
env.set("HSA_TOOLS_LIB", "unset")
if "+rocm_smi" in spec:
env.append_flags("CFLAGS", "-I%s/rocm_smi" % spec["rocm-smi-lib"].prefix.include)
#
# Intel OneAPI LLVM cannot compile papi unless the DBG enviroment variable is cleared
#
if spec.satisfies("%oneapi"):
env.set("DBG", "")
setup_run_environment = setup_build_environment