remove compiler optimize level limit of O2 for GCC (#32303)

gfortran can make it with O3, it might be better to remove this limitation.
This commit is contained in:
Zhilin Zheng 2022-08-23 18:13:47 +08:00 committed by GitHub
parent abdecd2a9b
commit b307d6e766
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,11 +72,6 @@ def setup_build_environment(self, env):
# microarchitecture-specific optimization flags should be controlled
# by Spack, otherwise we may end up with contradictory or invalid flags
# see https://github.com/spack/spack/issues/17794
# libxc on the other hand only sets the generic -O2 when it detects GCC
optflags = "-O2"
env.append_flags("CFLAGS", optflags)
env.append_flags("FCFLAGS", optflags)
if "%intel" in self.spec:
env.append_flags("CFLAGS", "-std=c99")