From: Sergey Kaplun via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Sergey Bronnikov <sergeyb@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] macOS: Fix macOS 15 / Clang 16 build.
Date: Thu, 27 Nov 2025 12:50:44 +0300 [thread overview]
Message-ID: <aSge9DFgRK0aCc93@root> (raw)
In-Reply-To: <5cc97979-5691-4945-aa7b-44b0eb191c73@tarantool.org>
Hi, Sergey!
Thanks for the review!
Fixed your comment and updated the branch.
On 25.11.25, Sergey Bronnikov wrote:
> Hi, Sergey!
>
> Thanks for the patch! LGTM with a minor comment.
>
> Sergey
>
> On 11/24/25 23:26, Sergey Kaplun wrote:
> > From: Mike Pall <mike>
> >
> > Note: The -Wl,-no_deduplicate workaround is NOT needed anymore.
> > Thanks to fxcoudert, corsix, clason, baconpaul, mvf.
> >
> > (cherry picked from commit 2240d84464cc3dcb22fd976f1db162b36b5b52d5)
> >
> > When building LuaJIT in the non-Debug mode, the -O2 optimization flag is
> > applied for both the compiler and the linker. Thus, the linker may apply
> > various optimizations, such as code deduplication. Since macOS 15, the
> > bundled Clang provided by Xcode tools may wrongly deduplicate the part
> > of the LuaJIT VM. One workaround may be to provide a flag to the linker
> > `-Wl,-no_deduplicate` [1], which helps to avoid wrong deduplication. The
> > other option is to remove emitting `.subsections_via_symbols` [2] to
> > avoid shrinking the object file by the labels.
> >
> > The second option is more robust, since there is no rationale why this
> > directive was added in the past.
> >
> > [1]:https://rocm.docs.amd.com/projects/llvm-project/en/latest/LLVM/lld/html/MachO/ld64-vs-lld.html
> > [2]:https://reviews.llvm.org/D79926
>
> I would also add a link to Mach-O File Format Reference [1]. We already
> referred to it in the commit 6e3aad8fb65f20a294171620b2e3bb4a8287e9b3
> ("OSX/iOS/ARM64: Fix generation of Mach-O object files.").
> Feel free to ignore.
>
> 1. https://github.com/aidansteele/osx-abi-macho-file-format-reference
Indeed, this link is brilliant, added.
The new commit message is the following:
| macOS: Fix macOS 15 / Clang 16 build.
|
| Note: The -Wl,-no_deduplicate workaround is NOT needed anymore.
| Thanks to fxcoudert, corsix, clason, baconpaul, mvf.
|
| (cherry picked from commit 2240d84464cc3dcb22fd976f1db162b36b5b52d5)
|
| When building LuaJIT in the non-Debug mode, the -O2 optimization flag is
| applied for both the compiler and the linker. Thus, the linker may apply
| various optimizations, such as code deduplication. Since macOS 15, the
| bundled Clang provided by Xcode tools may wrongly deduplicate the part
| of the LuaJIT VM. One workaround may be to provide a flag to the linker
| `-Wl,-no_deduplicate` [1], which helps to avoid wrong deduplication. The
| other option is to remove emitting `.subsections_via_symbols` [2][3] to
| avoid shrinking the object file by the labels.
|
| The second option is more robust, since there is no rationale why this
| directive was added in the past.
|
| [1]: https://rocm.docs.amd.com/projects/llvm-project/en/latest/LLVM/lld/html/MachO/ld64-vs-lld.html
| [2]: https://reviews.llvm.org/D79926
| [3]: https://github.com/aidansteele/osx-abi-macho-file-format-reference
|
| Sergey Kaplun:
| * added the description for the problem
|
| Part of tarantool/tarantool#11691
>
> <snipped>
--
Best regards,
Sergey Kaplun
next prev parent reply other threads:[~2025-11-27 9:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-24 20:26 [Tarantool-patches] [PATCH luajit 0/3] Various fixes for macOS Sergey Kaplun via Tarantool-patches
2025-11-24 20:26 ` [Tarantool-patches] [PATCH luajit 1/3] macOS: Fix macOS 15 / Clang 16 build Sergey Kaplun via Tarantool-patches
2025-11-25 13:56 ` Sergey Bronnikov via Tarantool-patches
2025-11-27 9:50 ` Sergey Kaplun via Tarantool-patches [this message]
2025-11-27 13:47 ` Sergey Bronnikov via Tarantool-patches
2025-11-24 20:26 ` [Tarantool-patches] [PATCH luajit 2/3] macOS: Workaround for buggy XCode 15.0 - 15.2 linker Sergey Kaplun via Tarantool-patches
2025-11-26 12:09 ` Sergey Bronnikov via Tarantool-patches
2025-11-27 9:59 ` Sergey Kaplun via Tarantool-patches
2025-11-27 13:55 ` Sergey Bronnikov via Tarantool-patches
2025-11-24 20:26 ` [Tarantool-patches] [PATCH luajit 3/3] macOS: Remove obsolete -single_module flag Sergey Kaplun via Tarantool-patches
2025-11-26 11:58 ` Sergey Bronnikov via Tarantool-patches
2025-11-27 9:44 ` Sergey Kaplun via Tarantool-patches
2025-11-27 14:06 ` Sergey Bronnikov via Tarantool-patches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aSge9DFgRK0aCc93@root \
--to=tarantool-patches@dev.tarantool.org \
--cc=sergeyb@tarantool.org \
--cc=skaplun@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH luajit 1/3] macOS: Fix macOS 15 / Clang 16 build.' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox