From d95f14084ea438185e35e9ce0cfa20dda4cff7bc Mon Sep 17 00:00:00 2001 From: Howard Pritchard Date: Tue, 18 Oct 2022 11:18:04 -0600 Subject: 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 Signed-off-by: Howard Pritchard --- var/spack/repos/builtin/packages/papi/package.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index f3fe762e44..35ea13fbd9 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -105,6 +105,11 @@ class Papi(AutotoolsPackage, ROCmPackage): 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 -- cgit v1.2.3-70-g09d2