Disable LTO in CI build with old gcc
This commit is contained in:
		
							parent
							
								
									593ed84f1b
								
							
						
					
					
						commit
						3c49517b76
					
				| @ -36,10 +36,16 @@ include(CheckIPOSupported) | ||||
| check_ipo_supported(RESULT ipo_available OUTPUT error LANGUAGES C) | ||||
| 
 | ||||
| # Enable IPO by default, if available | ||||
| if(NOT DEFINED CMAKE_INTERPROCEDURAL_OPTIMIZATION) | ||||
|   if(ipo_available) | ||||
|     set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) | ||||
|   else() | ||||
|   message(WARNING "IPO is not supported, expect performance penalty") | ||||
|     message(WARNING "IPO is not supported, disabling") | ||||
|   endif() | ||||
| endif() | ||||
| 
 | ||||
| if(NOT CMAKE_INTERPROCEDURAL_OPTIMIZATION) | ||||
|   message(WARNING "IPO is not enabled, expect performance penalty") | ||||
| endif() | ||||
| 
 | ||||
| # Extra build type for AddressSanitizer (Asan) | ||||
|  | ||||
| @ -92,6 +92,9 @@ let | ||||
|       stdenv = stdenv; | ||||
|     }).overrideAttrs (old: { | ||||
|       pname = old.name + "@" + stdenv.cc.cc.version; | ||||
|       cmakeFlags = old.cmakeFlags ++ [ | ||||
|         "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF" | ||||
|       ]; | ||||
|     }); | ||||
| 
 | ||||
|     oldCompilers = [ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user