mirror of
				https://github.com/shivammathur/setup-php.git
				synced 2025-10-30 23:07:56 +07:00 
			
		
		
		
	Fix jit config on arm
This commit is contained in:
		| @ -742,7 +742,7 @@ act -P ubuntu-22.04=shivammathur/node:2204 | ||||
|  | ||||
| - To enable JIT, enable `opcache` in cli mode by setting `opcache.enable_cli=1`. | ||||
| - JIT conflicts with `Xdebug`, `PCOV`, and other extensions which override `zend_execute_ex` function, so set `coverage: none` and disable any such extension if added. | ||||
| - By default, `opcache.jit=1235` and `opcache.jit_buffer_size=256M` are set which can be changed using `ini-values` input. | ||||
| - By default, `opcache.jit=1235` and `opcache.jit_buffer_size=256M` (`opcache.jit_buffer_size=128M` on ARM-based environments) are set which can be changed using `ini-values` input. | ||||
| - For detailed information about JIT related directives refer to the [`official PHP documentation`](https://www.php.net/manual/en/opcache.configuration.php#ini.opcache.jit "opcache.jit documentation"). | ||||
|  | ||||
| For example to enable JIT in `tracing` mode with buffer size of `64 MB`. | ||||
|  | ||||
							
								
								
									
										3
									
								
								src/configs/ini/jit_aarch64.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								src/configs/ini/jit_aarch64.ini
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| opcache.enable=1 | ||||
| opcache.jit_buffer_size=128M | ||||
| opcache.jit=1235 | ||||
| @ -244,7 +244,9 @@ configure_php() { | ||||
|   add_php_config | ||||
|   ini_config_dir="${src:?}"/configs/ini | ||||
|   ini_config_files=("$ini_config_dir"/php.ini) | ||||
|   jit_config_files=("$ini_config_dir"/jit.ini) | ||||
|   arch="$(uname -m)" | ||||
|   [[ "$arch" = "arm64" || "$arch" = "aarch64" ]] && jit_ini="$ini_config_dir"/jit_aarch64.ini || jit_ini="$ini_config_dir"/jit.ini | ||||
|   jit_config_files=("$jit_ini") | ||||
|   [[ "$version" =~ $xdebug3_versions ]] && ini_config_files+=("$ini_config_dir"/xdebug.ini) | ||||
|   cat "${ini_config_files[@]}" | sudo tee -a "${ini_file[@]:?}" >/dev/null 2>&1 | ||||
|   [[ "$version" =~ $jit_versions ]] && cat "${jit_config_files[@]}" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Shivam Mathur
					Shivam Mathur