-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Windows on Arm64 (WoA) build #413
Closed
chirontt
wants to merge
2
commits into
eclipse-platform:master
from
chirontt:support_windows_on_arm64
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> | ||
<classpathentry kind="src" path="Eclipse SWT/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT PI/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT PI/win32"> | ||
<attributes> | ||
<attribute value="org.eclipse.swt.win32.win32.aarch64" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" path="Eclipse SWT OLE Win32/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT Accessibility/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT Accessibility/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT AWT/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT AWT/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Drag and Drop/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT Drag and Drop/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Printing/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT Printing/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Program/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT Program/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Custom Widgets/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Browser/common"/> | ||
<classpathentry kind="src" path="Eclipse SWT Browser/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT OpenGL/win32"/> | ||
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and other similar changes are not exactly correct, because on aarch64 disasm can't match the expected bytes. If you're not going to implement it now, it would be more correct to change this to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the above objection at all.
What is the meaning of "aarch64 disasm can't match the expected bytes"? What is "aarch64 disasm" to do with this change in the C code?
What does it mean by "If you're not going to implement it now"? implement what exactly? The modified code compiles successfully with the Microsoft C/C++ native compiler for Arm64, so what kind of "implement" is needed here? I'm quite confused, to be honest.
If you object to the use of those predefined macros in the C code, they are specifically meant to be used with the Microsoft C/C++ compiler, targeting the Windows OS, as documented here. This C code is not for any other OS but the Windows OS, so naturally the code is specifically designed to be compiled by the dominant compiler in the Windows system (Microsoft Visual Studio Suite).
The
build.bat
command file was also designed for Microsoft Visual Studio compiler tools, and my changes are to continue the usage of the same tools, for generating the native binaries for the Windows on Arm64 platform.If you object to the use of Microsoft C/C++ tools here for the Windows OS, then this would become a huge topic that this PR can't address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SyntevoAlex
Looks like acronym "disasm" caused some confusion:
aarch64 "disasm" actually stands for aarch64 disassembler
@chirontt
IMHO, above comment only meant to re-arrange arm64 code something as below:
#ifdef _M_X64
{
// Existing conditions for TRUE cases, which my apply only to _M_X64 only
return TRUE;
}
return FALSE;
#elif defined(_M_ARM64)
{
// TODO: Add Conditions for any known TRUE cases for arm64
// Not implemented yet
}
return FALSE;
#else
#error Unsupported processor type
#endif
Please correct me if I got it wrong. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in question tests compiled code (machine instructions, which can be seen as assembly code, which I described as disasm for shorthand). It verifies that machine code in a Windows library matches what's expected. This is because the APIs are not documented, but we still need them, so we need to check if at least it's still the API we expected.
Surely aarch64 machine code differs from x86_64 machine code. That's the whole point of a different architecture. Otherwise you could just run x86_64 native libraries on aarch64.
Therefore, even if the code "compiles" for you, it will not work. To fix that, you have to implement checks specific to aarch64.
If you're not implementing that now, then change the code as I suggested, so that it's more clear that it's not implemented and doesn't look like "it's good".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically, as a result of NOT implementing the new checks, Dark Theme will stop working properly (scrollbars will be light, etc).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I can see what you meant now. Thanks for the explanation. And here's a screenshot of Eclipse SDK in dark mode (built myself and running on my WoA box):
As it shows, the scrollbars are not dark, so the code blocks within the
don't work properly in Windows Arm64; it may also not work if it just does
return FALSE;
instead, as suggested (I'll rebuild it and check it out later.)In the mean time, I'll withdraw this PR, as it's become clear now that it's not useful, because the build infrastructure for building Windows on Arm64 artifacts is not yet in place to support it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aarch64 disasm taken care of at #1048