Undeprecate ENV.O1/ENV.O0
These are still used in Homebrew/homebrew-core. The others are either - default (Os on macOS, O2 on Linux) - less reliable than the default (O3) While we're here, also remove an outdated `ncurses_define` comment.
This commit is contained in:
		
							parent
							
								
									e818e8f4c6
								
							
						
					
					
						commit
						39b3bcdce4
					
				| @ -238,7 +238,6 @@ module SharedEnvExtension | ||||
| 
 | ||||
|   # Snow Leopard defines an NCURSES value the opposite of most distros. | ||||
|   # @see https://bugs.python.org/issue6848 | ||||
|   # Currently only used by aalib in core. | ||||
|   sig { void } | ||||
|   def ncurses_define | ||||
|     odeprecated "ENV.ncurses_define" | ||||
|  | ||||
| @ -97,7 +97,7 @@ module Stdenv | ||||
|     old | ||||
|   end | ||||
| 
 | ||||
|   %w[O3 O2 O1 O0 Os].each do |opt| | ||||
|   %w[O3 O2 Os].each do |opt| | ||||
|     define_method opt do | ||||
|       odisabled "ENV.#{opt}" | ||||
| 
 | ||||
| @ -106,6 +106,13 @@ module Stdenv | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   %w[O1 O0].each do |opt| | ||||
|     define_method opt do | ||||
|       send(:remove_from_cflags, /-O./) | ||||
|       send(:append_to_cflags, "-#{opt}") | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   sig { returns(T.any(String, Pathname)) } | ||||
|   def determine_cc | ||||
|     s = super | ||||
|  | ||||
| @ -344,7 +344,7 @@ module Superenv | ||||
|     append_to_cccfg "O" | ||||
|   end | ||||
| 
 | ||||
|   %w[O3 O2 O1 O0 Os].each do |opt| | ||||
|   %w[O3 O2 Os].each do |opt| | ||||
|     define_method opt do | ||||
|       odisabled "ENV.#{opt}" | ||||
| 
 | ||||
| @ -352,6 +352,12 @@ module Superenv | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   %w[O1 O0].each do |opt| | ||||
|     define_method opt do | ||||
|       send(:[]=, "HOMEBREW_OPTIMIZATION_LEVEL", opt) | ||||
|     end | ||||
|   end | ||||
| 
 | ||||
|   sig { void } | ||||
|   def set_x11_env_if_installed | ||||
|     odisabled "ENV.set_x11_env_if_installed" | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Mike McQuaid
						Mike McQuaid