mirror of
				https://gitlab.com/qemu-project/edk2.git
				synced 2025-10-30 07:56:39 +08:00 
			
		
		
		
	EmbeddedPkg/VirtualRealTimeClockLib: Use SOURCE_DATE_EPOCH
Change VirtualRealTimeClockLib.inf to use SOURCE_DATE_EPOCH instead of Linux only shell command. This allows this library to be used in Windows build environments. Signed-off-by: Leif Lindholm <leif.lindholm@oss.qualcomm.com>
This commit is contained in:
		 Michael D Kinney
					Michael D Kinney
				
			
				
					committed by
					
						![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
			
				
	
			
			
			![mergify[bot]](/assets/img/avatar_default.png) mergify[bot]
						mergify[bot]
					
				
			
						parent
						
							fcc568ca6e
						
					
				
				
					commit
					fe52108211
				
			| @ -80,12 +80,7 @@ LibGetTime ( | ||||
|   if (EFI_ERROR (Status)) { | ||||
|     ASSERT (Status != EFI_INVALID_PARAMETER); | ||||
|     ASSERT (Status != EFI_BUFFER_TOO_SMALL); | ||||
|     // | ||||
|     // The following is intended to produce a compilation error on build | ||||
|     // environments where BUILD_EPOCH can not be set from inline shell. | ||||
|     // If you are attempting to use this library on such an environment, please | ||||
|     // contact the edk2 mailing list, so we can try to add support for it. | ||||
|     // | ||||
|  | ||||
|     EpochSeconds = BUILD_EPOCH; | ||||
|     DEBUG (( | ||||
|       DEBUG_INFO, | ||||
|  | ||||
| @ -33,6 +33,5 @@ | ||||
|   TimeBaseLib | ||||
|   UefiRuntimeLib | ||||
|  | ||||
| # Current usage of this library expects GCC in a UNIX-like shell environment with the date command | ||||
| [BuildOptions] | ||||
|   GCC:*_*_*_CC_FLAGS = -DBUILD_EPOCH=`printenv SOURCE_DATE_EPOCH || date +%s` | ||||
|   *_*_*_CC_FLAGS = -DBUILD_EPOCH=$(SOURCE_DATE_EPOCH) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user