-
Notifications
You must be signed in to change notification settings - Fork 126
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
Build Skiko with Clang-CL #1020
base: master
Are you sure you want to change the base?
Conversation
fc06646
to
4994bc5
Compare
The CI is failing because this PR depends on a new Skia-pack release (-2). |
/** | ||
* Create a copy of this iterator | ||
*/ | ||
fun clone(): BreakIterator { | ||
Stats.onNativeCall() | ||
return BreakIterator(withErrorGuard("Failed to clone") { _nClone(_ptr, 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.
I reckon this change would probably require bumping Skiko version to 0.9 🤔
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.
Okay, we'll build the next version as 0.9.0
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.
Explanation why it is deleted in an internal channel: https://jetbrains.slack.com/archives/C02DDNREC77/p1738678000232729
breakIteratorCloneTest
is failing with an access violation in Debug mode with additional checks, so using it wasn't safe- it is not used anywhery
9b63fd3
to
3471a22
Compare
/** | ||
* Create a copy of this iterator | ||
*/ | ||
fun clone(): BreakIterator { | ||
Stats.onNativeCall() | ||
return BreakIterator(withErrorGuard("Failed to clone") { _nClone(_ptr, 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.
Okay, we'll build the next version as 0.9.0
|
It is broken on JVM and seemingly leads to a use-after-free behaviour
2452284
to
d8aa60a
Compare
Binary size 27 % is smaller |
Official Skia documentation suggests that it's highly recommended to build Skia with Clang-CL on Windows, and that this dramatically improves Skia performance with Software rendering and in other areas. This corresponds with my experience, so here it is.
Related Skia-pack PR: JetBrains/skia-pack#64
There are a couple more changes in this PR:
It removes the
BreakIterator.clone()
method as it's broken on JVM, seemingly due to a "use-after-free" bug.It changes the
build-with-local-skia.sh
a bit to correctly determine the ARM64 platform. There is currently no native MSYS2 for ARM64, and the emulated one will returnx86_64
foruname
. So we should use Powershell instead.