-
Notifications
You must be signed in to change notification settings - Fork 316
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
fix missing ___clear_cache when targetting iOS #294
base: master
Are you sure you want to change the base?
Conversation
includes patches to - randomx: tevador/RandomX#294 - randomwow: https://git.wownero.com/wownero/RandomWOW/pulls/2
This is not a fix, you just removed (using #ifdef) the code that breaks the build. You still need to clear the code cache on arm64 CPUs. If you read the discussion in xmrig/xmrig#1246 and check the code in https://github.com/xmrig/xmrig/blob/master/src/crypto/common/VirtualMemory_unix.cpp#L206 you'll see there are more things needed to be done here to fix it. I'm not sure this fix is even needed because all recent clang versions have |
Sorry! I've missed that part of the discussion, is fix like this more suitable or should I leave
I'm currently building with the toolchain that ships with latest Xcode on macos, so at least on my machine it didn't work. |
The C++ code has |
I've seen these solutions (and tried some), and they target macos instead of ios, and according to (a rather old) issue https://gitlab.haskell.org/ghc/ghc/-/issues/8561 ___clear_cache is a thing on MacOS but not iOS, people there also mention that JIT is not really a possible option on non-jailbroken iOS device, which also makes RandomX unusable, at least for the vast majority of iOS users. luajit case mentioned in that issue also seems to treat iOS as a special thing when it comes to clearning cache https://repo.or.cz/luajit-2.0.git/blob/HEAD:/src/lj_mcode.c#l51
|
0ecc9f2
to
9803b04
Compare
Do not merge, aarch64-linux-android was broken in this port, I'll take look at it in a bit. |
Resolved. Testing on iOS is still pending - but it should work without issues, it doesn't break windows, linux and macos builds. |
Without the patch I get the following issue
I've found the very same fix used in xmrig/xmrig@10d2920
I didn't check the fix on iOS yet, but the library linked properly, so I guess it is good.