Skip to content
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

Merged
merged 4 commits into from
Dec 25, 2024
Merged

Conversation

xqg243795168
Copy link

3.4 version OHOS adaptation

3.4 version OHOS adaptation
add appveyor.yml
@@ -1,4 +1,7 @@

-- jit off
local jit = require("jit")
jit.off()
Copy link
Contributor

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?

Copy link
Author

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

Copy link
Contributor

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?

Copy link
Author

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.

Copy link
Contributor

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

Copy link
Author

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?

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Author

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
@minggo minggo merged commit 73b36d7 into cocos2d:cocos2d-x-3.4-oh Dec 25, 2024
@xqg243795168 xqg243795168 deleted the cocos2d-x-3.4-oh branch December 28, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants