From f10b9337c613d52698df3a50a54c59a6afe9e0b9 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 23 Jun 2020 03:24:40 +0200 Subject: [PATCH] OSX/iOS: Handle iOS simulator and ARM64 Macs. (cherry picked from commit 2e2fb8f6b5118e1a7996b76600c6ee98bfd5f203) 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 Reviewed-by: Sergey Ostanevich Signed-off-by: Igor Munkin --- .../gh-6065-jit-library-smoke-tests.test.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/tarantool-tests/gh-6065-jit-library-smoke-tests.test.lua diff --git a/test/tarantool-tests/gh-6065-jit-library-smoke-tests.test.lua b/test/tarantool-tests/gh-6065-jit-library-smoke-tests.test.lua new file mode 100644 index 0000000000..7110e3512b --- /dev/null +++ b/test/tarantool-tests/gh-6065-jit-library-smoke-tests.test.lua @@ -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, +-- raises an error that is handled via and passed +-- as a second argument to the assertion. +test:ok(pcall(jit.on)) + +os.exit(test:check() and 0 or 1)