Extract build-time stdlib check to a method
This commit is contained in:
		
							parent
							
								
									f743351c60
								
							
						
					
					
						commit
						105db77fc0
					
				@ -163,7 +163,23 @@ class Build
 | 
			
		||||
 | 
			
		||||
        begin
 | 
			
		||||
          f.install
 | 
			
		||||
          stdlibs = detect_stdlibs
 | 
			
		||||
          Tab.create(f, ENV.compiler, stdlibs.first, f.build).write
 | 
			
		||||
        rescue Exception => e
 | 
			
		||||
          if ARGV.debug?
 | 
			
		||||
            debrew e, f
 | 
			
		||||
          else
 | 
			
		||||
            raise e
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        # Find and link metafiles
 | 
			
		||||
        f.prefix.install_metafiles Pathname.pwd
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def detect_stdlibs
 | 
			
		||||
    keg = Keg.new(f.prefix)
 | 
			
		||||
    # This first test includes executables because we still
 | 
			
		||||
    # want to record the stdlib for something that installs no
 | 
			
		||||
@ -185,20 +201,6 @@ class Build
 | 
			
		||||
    # and dylibs against libc++, libc++-only dependencies can safely
 | 
			
		||||
    # link against it.
 | 
			
		||||
    stdlibs = keg.detect_cxx_stdlibs :skip_executables => true
 | 
			
		||||
 | 
			
		||||
          Tab.create(f, ENV.compiler, stdlibs.first, f.build).write
 | 
			
		||||
        rescue Exception => e
 | 
			
		||||
          if ARGV.debug?
 | 
			
		||||
            debrew e, f
 | 
			
		||||
          else
 | 
			
		||||
            raise e
 | 
			
		||||
          end
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        # Find and link metafiles
 | 
			
		||||
        f.prefix.install_metafiles Pathname.pwd
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def fixopt f
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user