[Git][ghc/ghc][wip/supersven/correctly_propagate_host-build-target] Prevent -g
Sven Tennie pushed to branch wip/supersven/correctly_propagate_host-build-target at Glasgow Haskell Compiler / GHC Commits: 979947b2 by Sven Tennie at 2026-03-26T16:40:12+01:00 Prevent -g - - - - - 1 changed file: - distrib/configure.ac.in Changes: ===================================== distrib/configure.ac.in ===================================== @@ -153,6 +153,14 @@ AC_SUBST([EnableStrictGhcToolchainCheck]) dnl ** Which gcc to use? dnl -------------------------------------------------------------- + +dnl AC_PROG_CC sets CFLAGS to `-g -O2` if if the env var is empty. +dnl Same goes for AC_PROG_CXX and CXXFLAGS. +dnl `-O2` is fine, but we don't want to build with debugging symbols (`-g`) by +dnl default as this massively increases binary sizes. +CFLAGS=${CFLAGS:-"-O2"} +CXXFLAGS=${CXXFLAGS:-"-O2"} + AC_PROG_CC([cc gcc clang]) AC_PROG_CXX([c++ g++ clang++]) # Work around #24324 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/979947b2b4dc5295923269690f955372... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/979947b2b4dc5295923269690f955372... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Sven Tennie (@supersven)