diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2023-05-04 17:33:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 11:33:35 -0400 |
commit | 86d3bad1e05140398f6e19919de38928f3d0c484 (patch) | |
tree | f1bc0fa88f22ce038298e57bb6868be5e25110bf /var | |
parent | 600955edd4ca22b2d94e725706fc4733d5c4e4d9 (diff) | |
download | spack-86d3bad1e05140398f6e19919de38928f3d0c484.tar.gz spack-86d3bad1e05140398f6e19919de38928f3d0c484.tar.bz2 spack-86d3bad1e05140398f6e19919de38928f3d0c484.tar.xz spack-86d3bad1e05140398f6e19919de38928f3d0c484.zip |
cmake build system: change default build type to `Release` (#36679)
This switches the default Make build type to `build_type=Release`.
This offers:
- higher optimization level, including loop vectorization on older GCC
- adds NDEBUG define, which disables assertions, which could cause speedups if assertions are in loops etc
- no `-g` means smaller install size
Downsides are:
- worse backtraces (though this does NOT strip symbols)
- perf reports may be useless
- no function arguments / local variables in debugger (could be of course)
- no file path / line numbers in debugger
The downsides can be mitigated by overriding to `build_type=RelWithDebInfo` in `packages.yaml`,
if needed. The upside is that builds will be MUCH smaller (and faster) with this change.
---------
Co-authored-by: Gregory Becker <becker33@llnl.gov>
Diffstat (limited to 'var')
25 files changed, 0 insertions, 174 deletions
diff --git a/var/spack/repos/builtin/packages/adios2/package.py b/var/spack/repos/builtin/packages/adios2/package.py index 960ad0174a..ef8535549f 100644 --- a/var/spack/repos/builtin/packages/adios2/package.py +++ b/var/spack/repos/builtin/packages/adios2/package.py @@ -37,14 +37,6 @@ class Adios2(CMakePackage, CudaPackage): version("2.4.0", sha256="50ecea04b1e41c88835b4b3fd4e7bf0a0a2a3129855c9cc4ba6cf6a1575106e2") version("2.3.1", sha256="3bf81ccc20a7f2715935349336a76ba4c8402355e1dc3848fcd6f4c3c5931893") - # General build options - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - # There's not really any consistency about how static and shared libs are # implemented across spack. What we're trying to support is specifically three # library build types: diff --git a/var/spack/repos/builtin/packages/ccls/package.py b/var/spack/repos/builtin/packages/ccls/package.py index a8968c8171..04a82cda1f 100644 --- a/var/spack/repos/builtin/packages/ccls/package.py +++ b/var/spack/repos/builtin/packages/ccls/package.py @@ -25,13 +25,6 @@ class Ccls(CMakePackage): "0.20201025", sha256="1470797b2c1a466e2d8a069efd807aac6fefdef8a556e1edf2d44f370c949221" ) - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - depends_on("cmake@3.8:", type="build") depends_on("llvm@7:") depends_on("rapidjson") diff --git a/var/spack/repos/builtin/packages/compadre/package.py b/var/spack/repos/builtin/packages/compadre/package.py index cdc568e1ed..74a17dd10a 100644 --- a/var/spack/repos/builtin/packages/compadre/package.py +++ b/var/spack/repos/builtin/packages/compadre/package.py @@ -28,13 +28,6 @@ class Compadre(CMakePackage): depends_on("kokkos-kernels@3.3.01:3.6") depends_on("cmake@3.13:", type="build") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - variant("mpi", default=False, description="Enable MPI support") depends_on("mpi", when="+mpi") diff --git a/var/spack/repos/builtin/packages/embree/package.py b/var/spack/repos/builtin/packages/embree/package.py index 64142e099f..b7c7fc0495 100644 --- a/var/spack/repos/builtin/packages/embree/package.py +++ b/var/spack/repos/builtin/packages/embree/package.py @@ -24,14 +24,6 @@ class Embree(CMakePackage): version("3.8.0", sha256="40cbc90640f63c318e109365d29aea00003e4bd14aaba8bb654fc1010ea5753a") version("3.7.0", sha256="2b6300ebe30bb3d2c6e5f23112b4e21a25a384a49c5e3c35440aa6f3c8d9fe84") - # default to Release, as RelWithDebInfo creates a lot of overhead - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - variant("ispc", default=True, description="Enable ISPC support") depends_on("ispc", when="+ispc", type="build") diff --git a/var/spack/repos/builtin/packages/enzyme/package.py b/var/spack/repos/builtin/packages/enzyme/package.py index 3b8b9d4a8d..e85374a5b0 100644 --- a/var/spack/repos/builtin/packages/enzyme/package.py +++ b/var/spack/repos/builtin/packages/enzyme/package.py @@ -30,13 +30,6 @@ class Enzyme(CMakePackage): version("0.0.14", sha256="740641eeeeadaf47942ac88cc52e62ddc0e8c25767a501bed36ec241cf258b8d") version("0.0.13", sha256="d4a53964ec1f763772db2c56e6734269b7656c8b2ecd41fa7a41315bcd896b5a") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - depends_on("llvm@7:12", when="@0.0.13:0.0.15") depends_on("llvm@7:14", when="@0.0.32:") # TODO actual lower bound depends_on("llvm@7:14", when="@0.0.48:") diff --git a/var/spack/repos/builtin/packages/fftx/package.py b/var/spack/repos/builtin/packages/fftx/package.py index 503fb0dd7e..423cf5e8b2 100644 --- a/var/spack/repos/builtin/packages/fftx/package.py +++ b/var/spack/repos/builtin/packages/fftx/package.py @@ -21,13 +21,6 @@ class Fftx(CMakePackage, CudaPackage, ROCmPackage): version("main", branch="main") version("1.0.3", sha256="b5ff275facce4a2fbabd0aecc65dd55b744794f2e07cd8cfa91363001c664896") - variant( - "build_type", - default="Release", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - description="The build type to build", - ) - depends_on("spiral-software") depends_on("spiral-package-fftx") depends_on("spiral-package-simt") diff --git a/var/spack/repos/builtin/packages/gpi-space/package.py b/var/spack/repos/builtin/packages/gpi-space/package.py index da0b74e713..1eb748b283 100644 --- a/var/spack/repos/builtin/packages/gpi-space/package.py +++ b/var/spack/repos/builtin/packages/gpi-space/package.py @@ -52,12 +52,6 @@ class GpiSpace(CMakePackage): description="GPI-2 fabric to enable", when="+iml", ) - variant( - "build_type", - default="Release", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - description="CMake build type", - ) depends_on("cmake@3.15.0:", type="build") depends_on("chrpath@0.13:", type=("build", "run")) diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py index da6e1994a8..82421aa9d2 100644 --- a/var/spack/repos/builtin/packages/helics/package.py +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -44,12 +44,6 @@ class Helics(CMakePackage): version("2.4.2", sha256="957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb") version("2.4.1", sha256="ac077e9efe466881ea366721cb31fb37ea0e72a881a717323ba4f3cdda338be4") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("apps", default=True, description="Install the HELICS apps executables") variant("apps_lib", default=True, description="Install the HELICS apps library") variant("benchmarks", default=False, description="Install the HELICS benchmarks") diff --git a/var/spack/repos/builtin/packages/keepassxc/package.py b/var/spack/repos/builtin/packages/keepassxc/package.py index d08ed8a16e..baf67627c8 100644 --- a/var/spack/repos/builtin/packages/keepassxc/package.py +++ b/var/spack/repos/builtin/packages/keepassxc/package.py @@ -21,13 +21,6 @@ class Keepassxc(CMakePackage): version("2.6.6", sha256="3603b11ac39b289c47fac77fa150e05fd64b393d8cfdf5732dc3ef106650a4e2") version("2.6.4", sha256="e536e2a71c90fcf264eb831fb1a8b518ee1b03829828f862eeea748d3310f82b") - variant( - "build_type", - default="Release", - description="The build type for the installation (only Debug or" - " ( Documentation indicates Release).", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("autotype", default=False, description="enable auto-type") variant("docs", default=True, description="Build documentation") diff --git a/var/spack/repos/builtin/packages/libristra/package.py b/var/spack/repos/builtin/packages/libristra/package.py index 8630a7325a..f87dbf17d5 100644 --- a/var/spack/repos/builtin/packages/libristra/package.py +++ b/var/spack/repos/builtin/packages/libristra/package.py @@ -20,13 +20,6 @@ class Libristra(CMakePackage): version("master", branch="master", submodules=False, preferred=True) version("1.0.0", commit="33235fe0334ca7f1f99b386a90932d9f8e1e71de") - variant( - "build_type", - default="Release", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - description="The build type to build", - multi=False, - ) variant("paraview", default=False, description="Enable ParaView") variant("shared_lua", default=False, description="Build with shared lua") diff --git a/var/spack/repos/builtin/packages/llvm-doe/package.py b/var/spack/repos/builtin/packages/llvm-doe/package.py index 7f312bdb66..7937124d75 100644 --- a/var/spack/repos/builtin/packages/llvm-doe/package.py +++ b/var/spack/repos/builtin/packages/llvm-doe/package.py @@ -89,12 +89,6 @@ class LlvmDoe(CMakePackage, CudaPackage): description="Build all supported targets, default targets " "<current arch>,NVPTX,AMDGPU,CppBackend", ) - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("omp_tsan", default=False, description="Build with OpenMP capable thread sanitizer") variant( "omp_as_runtime", diff --git a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py index d4aaf43ce6..cec56554ed 100644 --- a/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py +++ b/var/spack/repos/builtin/packages/llvm-openmp-ompt/package.py @@ -34,13 +34,6 @@ class LlvmOpenmpOmpt(CMakePackage): "libomptarget", default=True, description="Enable building libomptarget for offloading" ) - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - depends_on("cmake@2.8:", type="build") depends_on("llvm", when="~standalone") depends_on("ninja@1.5:", type="build") diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index c7cc2df3c8..f62822e3ca 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -162,12 +162,6 @@ class Llvm(CMakePackage, CudaPackage): multi=True, ) variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - variant( "omp_tsan", default=False, when="@6:", diff --git a/var/spack/repos/builtin/packages/netlib-scalapack/package.py b/var/spack/repos/builtin/packages/netlib-scalapack/package.py index 95f164ef49..eeb1ea0a97 100644 --- a/var/spack/repos/builtin/packages/netlib-scalapack/package.py +++ b/var/spack/repos/builtin/packages/netlib-scalapack/package.py @@ -13,13 +13,6 @@ class ScalapackBase(CMakePackage): of the library in the 'amdscalapack' package. """ - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - variant("shared", default=True, description="Build the shared library version") variant("pic", default=False, description="Build position independent code") diff --git a/var/spack/repos/builtin/packages/omnitrace/package.py b/var/spack/repos/builtin/packages/omnitrace/package.py index 4fb8e30563..a7bd90f82b 100644 --- a/var/spack/repos/builtin/packages/omnitrace/package.py +++ b/var/spack/repos/builtin/packages/omnitrace/package.py @@ -28,14 +28,6 @@ class Omnitrace(CMakePackage): version("1.3.0", commit="4dd144a32c8b83c44e132ef53f2b44fe4b4d5569", submodules=True) version("1.2.0", commit="f82845388aab108ed1d1fc404f433a0def391bb3", submodules=True) - # override build_type to default to Release because this has a significant - # impact on build-time and the size of the build - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant( "rocm", default=True, diff --git a/var/spack/repos/builtin/packages/opencarp/package.py b/var/spack/repos/builtin/packages/opencarp/package.py index 1a28dc3682..bdb752343b 100644 --- a/var/spack/repos/builtin/packages/opencarp/package.py +++ b/var/spack/repos/builtin/packages/opencarp/package.py @@ -30,13 +30,6 @@ class Opencarp(CMakePackage): variant("carputils", default=False, description="Installs the carputils framework") variant("meshtool", default=False, description="Installs the meshtool software") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - # Patch removing problematic steps in CMake process patch("opencarp7.patch", when="@7.0") diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py index aae4c5957a..c0acd56166 100644 --- a/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane-lightning-kokkos/package.py @@ -54,12 +54,6 @@ class PyPennylaneLightningKokkos(CMakePackage, PythonExtension, CudaPackage, ROC # build options extends("python") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("cpptests", default=False, description="Build CPP tests") variant("native", default=False, description="Build natively for given hardware") variant("sanitize", default=False, description="Build with address sanitization") diff --git a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py index d58b682587..9648c02f85 100644 --- a/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py +++ b/var/spack/repos/builtin/packages/py-pennylane-lightning/package.py @@ -39,13 +39,6 @@ class PyPennylaneLightning(CMakePackage, PythonExtension): variant("cpptests", default=False, description="Build CPP tests") variant("cppbenchmarks", default=False, description="Build CPP benchmark examples") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - extends("python") # hard dependencies diff --git a/var/spack/repos/builtin/packages/sleef/package.py b/var/spack/repos/builtin/packages/sleef/package.py index 05061d6ec0..663ffff3de 100644 --- a/var/spack/repos/builtin/packages/sleef/package.py +++ b/var/spack/repos/builtin/packages/sleef/package.py @@ -44,12 +44,6 @@ class Sleef(CMakePackage): # See https://github.com/shibatch/sleef/issues/234 # See https://github.com/pytorch/pytorch/issues/26892 # See https://github.com/pytorch/pytorch/pull/26993 - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) generator("ninja") depends_on("cmake@3.4.3:", type="build") diff --git a/var/spack/repos/builtin/packages/sollve/package.py b/var/spack/repos/builtin/packages/sollve/package.py index 0cf42989b1..6a617eae34 100644 --- a/var/spack/repos/builtin/packages/sollve/package.py +++ b/var/spack/repos/builtin/packages/sollve/package.py @@ -53,12 +53,6 @@ class Sollve(CMakePackage): description="Build all supported targets, default targets " "<current arch>,NVPTX,AMDGPU,CppBackend", ) - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("omp_tsan", default=False, description="Build with OpenMP capable thread sanitizer") variant("python", default=False, description="Install python bindings") variant("argobots", default=True, description="Use Argobots in BOLT") diff --git a/var/spack/repos/builtin/packages/spiral-software/package.py b/var/spack/repos/builtin/packages/spiral-software/package.py index c59d616388..0fd4f47423 100644 --- a/var/spack/repos/builtin/packages/spiral-software/package.py +++ b/var/spack/repos/builtin/packages/spiral-software/package.py @@ -24,13 +24,6 @@ class SpiralSoftware(CMakePackage): version("8.2.1", sha256="78d7bb1c22a5b2d216eac7b6ddedd20b601ba40227e64f743cbb54d4e5a7794d") version("8.2.0", sha256="983f38d270ae2cb753c88cbce3f412e307c773807ad381acedeb9275afc0be32") - variant( - "build_type", - default="Release", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - description="Build the Release version by default", - ) - extendable = True # No dependencies. diff --git a/var/spack/repos/builtin/packages/templight/package.py b/var/spack/repos/builtin/packages/templight/package.py index 0ebbd66fad..f0bd4071c0 100644 --- a/var/spack/repos/builtin/packages/templight/package.py +++ b/var/spack/repos/builtin/packages/templight/package.py @@ -81,15 +81,6 @@ class Templight(CMakePackage): ) patch("develop-20180720.patch", when="@2018.07.20") - # Clang debug builds can be _huge_ (20+ GB), make sure you know what you - # are doing before switching to them - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - # NOTE: LLVM has many configurable tweaks and optional tools/extensions. # I did not think that propagating all of these to a debugging and # performance analysis tool was worth the maintenance burden. But diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py index 11b576415e..ee30d22b1c 100644 --- a/var/spack/repos/builtin/packages/vtk-m/package.py +++ b/var/spack/repos/builtin/packages/vtk-m/package.py @@ -50,14 +50,6 @@ class VtkM(CMakePackage, CudaPackage, ROCmPackage): version("1.2.0", sha256="607272992e05f8398d196f0acdcb4af025a4a96cd4f66614c6341f31d4561763") version("1.1.0", sha256="78618c81ca741b1fbba0853cb5d7af12c51973b514c268fc96dfb36b853cdb18") - # use release, instead of release with debug symbols b/c vtkm libs - # can overwhelm compilers with too many symbols - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) variant("shared", default=False, description="build shared libs") variant("doubleprecision", default=True, description="enable double precision") diff --git a/var/spack/repos/builtin/packages/winbison/package.py b/var/spack/repos/builtin/packages/winbison/package.py index a17fdde893..ebf50267b1 100644 --- a/var/spack/repos/builtin/packages/winbison/package.py +++ b/var/spack/repos/builtin/packages/winbison/package.py @@ -37,13 +37,6 @@ class Winbison(CMakePackage): build_directory = "spack-build" cmake_dir = os.path.join(build_directory, "CMakeBuild") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - @classmethod def determine_version(cls, exe): output = Executable(exe)("--version", output=str, error=str) diff --git a/var/spack/repos/builtin/packages/xyce/package.py b/var/spack/repos/builtin/packages/xyce/package.py index 333d406ec2..e69f781504 100644 --- a/var/spack/repos/builtin/packages/xyce/package.py +++ b/var/spack/repos/builtin/packages/xyce/package.py @@ -35,13 +35,6 @@ class Xyce(CMakePackage): depends_on("flex") depends_on("bison") - variant( - "build_type", - default="Release", - description="CMake build type", - values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), - ) - variant("mpi", default=True, description="Enable MPI support") depends_on("mpi", when="+mpi") |