eclipse-equinox / equinox

equinox
Eclipse Public License 2.0
28 stars 60 forks source link

[Build] Derive TARGET_ARCH from -arch argument in make_win64.mak #639

Closed HannesWell closed 3 weeks ago

HannesWell commented 3 weeks ago

This allows cross-compilation on Windows between x86_64 and aarch64 by specifying the -arch argument as usual when calling the win32/build.bat script.

@chirontt do you see any problem with this?

github-actions[bot] commented 3 weeks ago

Test Results

  660 files  ±0    660 suites  ±0   1h 11m 44s :stopwatch: -2s 2 195 tests ±0  2 147 :white_check_mark:  - 1   47 :zzz: ±0  1 :x: +1  6 729 runs  ±0  6 585 :white_check_mark:  - 1  143 :zzz: ±0  1 :x: +1 

For more details on these failures, see this check.

Results for commit 73b0a0c0. ± Comparison against base commit 343e816e.

:recycle: This comment has been updated with latest results.

chirontt commented 3 weeks ago

Sounds good to me to re-use the -arch argument for cross-compiling purpose. This removes the need to set a TARGET_ARCH environment variable for cross-compiling, as originally intended.

But cross-compiling also requires a target JDK for the relevant headers and/or libraries suitable for the target architecture. Can the -java argument be used for this purpose?

HannesWell commented 3 weeks ago

Sounds good to me to re-use the -arch argument for cross-compiling purpose. This removes the need to set a TARGET_ARCH environment variable for cross-compiling, as originally intended.

Exactly. And it also verifies that the jdk passed with the -java argument exists.

But cross-compiling also requires a target JDK for the relevant headers and/or libraries suitable for the target architecture. Can the -java argument be used for this purpose?

That's also right and yes the -java argument can be used for that. I'm currently enhancing the documentation about how to build the Equinox binaries in https://github.com/eclipse-equinox/equinox/pull/640 and mentioned in there as an example.

HannesWell commented 3 weeks ago

Build is green now (besides the usual TCK failure and an occasional DS test failure).