On Tue, 13 Apr 2021 08:41:12 GMT, Alexander Scherbatiy <alex...@openjdk.org> 
wrote:

>> This is a proposal for cross compiling JavaFX base modules (excluding media 
>> and webkit) for Windows AArch64 (ARM64).
>> 
>> Main changes:
>> - prismES2 native compilation is moved under IS_INCLUDE_ES2 condition
>> - HOST_ARCH and TARGET_ARCH are retrieved from  ext.OS_ARCH and 
>> ext.TARGET_ARCH using substitution aarch64 to arm64 and amd64 to x64
>> - VCARCH is set to  "${HOST_ARCH}_${TARGET_ARCH}" architecture for cross 
>> compilation. VCARCH is set to x64 for amd64 target architecture (according 
>> to the [vcvarsall.bat 
>> doc](https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-160#developer_command_file_locations)
>>  x64 and amd64 are interchangeable)
>> - arm64 rc.exe and fxc.exe execution fails on non arm64 host. The fix checks 
>> that and falls back to host rc.exe and fxc.exe. The right way would be to 
>> use rc.exe and fxc.exe from arm64 but I did not find a right way to run them 
>> on host system.
>> 
>> I also looked which changes are required to build media module for Windows 
>> aarch64.
>> The main changes could be using:
>> - `ARCH=arm64` for building media libs in build.gradle file
>> - `-MACHINE:arm64` LDFLAGS in media make files
>> - `msvc_build/aarch64/aarch64_include` header files for include, 
>> `src/aarch64/win64_armasm.S` for ASM_SOURCES, `armasm64.exe` for ML in 
>> gstreamer/projects/win/glib-lite/Makefile.glib file and corresponding 
>> include in gstreamer/projects/win/glib-lite/Makefile.gobject file
>> - setting `ENABLE_SIMD_SSE2` to 0 in ColorConverter.c in the similar way how 
>> it is done for Apple Silicon port
>> 
>> In this way the media is build but it is crashed when I run a JavaFX sample 
>> with video.
>> Is it possible to send the media Windows aarch64 port to review and 
>> investigate the crash in the separate fix?
>
> Alexander Scherbatiy has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Remove mt.exe from win.gradle build script

I think this is is fine. I did a local build to ensure that x64 builds are not 
impacted.

I left a question and a comment inline.

buildSrc/win.gradle line 468:

> 466:         case "aarch64" : return "arm64"
> 467:         case "amd64" : return "x64"
> 468:         default: return arch

This looks fine. I recommend to sanity test this on a 32-bit build to ensure 
that `os.arch` is `x86` (I don't have the ability to do that).

buildSrc/win.gradle line 474:

> 472: boolean isExecutable(String file) {
> 473:     try {
> 474:         Runtime.runtime.exec(file)

Is there a way other than to execute the command in question -- `rc` or  `fxc` 
-- to see whether it will execute? I note that `fxc` will print a warning 
message when run with no arguments (but even with `gradle --info` it isn't 
printed to the console).

-------------

PR: https://git.openjdk.java.net/jfx/pull/439

Reply via email to