Skip to content

Instantly share code, notes, and snippets.

@haampie
Last active April 16, 2021 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haampie/8e12787357310f0dc0faa3b1771848d6 to your computer and use it in GitHub Desktop.
Save haampie/8e12787357310f0dc0faa3b1771848d6 to your computer and use it in GitHub Desktop.
Spack force release mode
diff --git a/lib/spack/env/cc b/lib/spack/env/cc
index 4d8c4644cb..3c4dcb35a7 100755
--- a/lib/spack/env/cc
+++ b/lib/spack/env/cc
@@ -384,6 +384,13 @@ while [ $# -ne 0 ]; do
other_args+=("$1")
fi
;;
+ -O0,-O1,-O2,-O3,-Os,-Ofast,-O)
+ # Always use -O3
+ other_args+=("-O3")
+ ;;
+ -g,-Werror)
+ # Drop debug symbols and never treat all warnings as errors
+ ;;
*)
if [[ "$1" = "$dtags_to_strip" ]] ; then
: # We want to remove explicitly this flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment