-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
3.4 version OHOS adaptation #20820
3.4 version OHOS adaptation #20820
Conversation
3.4 version OHOS adaptation
add appveyor.yml
tests/lua-tests/src/controller.lua
Outdated
@@ -1,4 +1,7 @@ | |||
|
|||
-- jit off | |||
local jit = require("jit") | |||
jit.off() |
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.
Why have to disable jit?
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.
JIT Capability Shutdown
Reason: To prevent malware from bypassing app market reviews by abusing JIT (RWX) memory to execute arbitrary code
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.
But why only this test case need to disable jit?
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.
disable jit here will apply to all test cases.
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 think it is better:
- disable it in mainmenu.lua is better
- only disable it on OHOS
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.
How can I only use the lua vm?
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.
Your meaning is that in CMake, we should not link LuaJIT? Will this have other impacts? LuaJIT has also made optimizations in other aspects.
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.
Yep, like iOS, it uses lua instead of luajit.
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.
It's also ok to use it as current implementation. Please make a decision and modify all PR.
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.
Also need use luajit. After disable jit, luaJIT remains more optimized. please see this bloc https://blog.csdn.net/u014397684/article/details/125686988
change sys_string "HarmonyOS Next"
change "jit off" to mainMenu only ohos
3.4 version OHOS adaptation