superenv: Use 02 optimization flag for Linux builds

`-Os` produces sometimes bigger binaries on Linux.
Also, llvm built with `-Os` is really slow at runtime for Linux.

Using `-02` aligns us with what Debian does, and as we are compiling most of our stuff with gcc (and not clang), it makes sense to use `-02` on Linux.
`-Os` does probably slightly different things when used on mac with llvm, compared to when it is used with gcc on Linux.
This commit is contained in:
Michka Popoff 2018-08-29 13:40:39 +02:00
parent 0af24cf8bc
commit b7b5fb930d

View File

@ -7,6 +7,7 @@ module Superenv
# @private
def setup_build_environment(formula = nil)
generic_setup_build_environment(formula)
self["HOMEBREW_OPTIMIZATION_LEVEL"] = "O2"
self["HOMEBREW_DYNAMIC_LINKER"] = determine_dynamic_linker_path
self["HOMEBREW_RPATH_PATHS"] = determine_rpath_paths(formula)
end