Skip to content

Commit

Permalink
OSX/iOS: Handle iOS simulator and ARM64 Macs.
Browse files Browse the repository at this point in the history
(cherry picked from commit 2e2fb8f)

After Apple released Macs working on ARM64, the previous recipe in
lj_arch.h for detecting various Apple platforms is not valid anymore.
Fortunately, there is a system header (namely, TargetConditionals.h),
provided by SDK with the proper defines to be set. Starting from this
patch, LuaJIT identifies Apple hosts via this header.

Since testing machinery assumes that LuaJIT is built with JIT support
being enabled unconditionally, a smoke test for it is also added
alongside with this patch.

Igor Munkin:
* added the description and the test for the problem
* backported the original patch to tarantool/luajit repo

Resolves tarantool/tarantool#6065
Part of tarantool/tarantool#5629
Relates to tarantool/tarantool#5983

Reviewed-by: Sergey Kaplun <[email protected]>
Reviewed-by: Sergey Ostanevich <[email protected]>
Signed-off-by: Igor Munkin <[email protected]>
  • Loading branch information
Mike Pall authored and igormunkin committed Jun 16, 2022
1 parent cc6dd17 commit f10b933
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/tarantool-tests/gh-6065-jit-library-smoke-tests.test.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
local tap = require('tap')

local test = tap.test('gh-6065-jit-library-smoke-tests')
test:plan(1)

-- Just check whether LuaJIT is built with JIT support. Otherwise,
-- <jit.on> raises an error that is handled via <pcall> and passed
-- as a second argument to the assertion.
test:ok(pcall(jit.on))

os.exit(test:check() and 0 or 1)

0 comments on commit f10b933

Please sign in to comment.