From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 9103315EDA9F; Tue, 25 Nov 2025 16:56:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9103315EDA9F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1764079013; bh=+u1GH4lfFAxi8ZBRh+MQwG/Vv5ujay2Q5UZfU4258YY=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=oWV9mZG4r5EhLDX/YUCPnbpuzaVe9sdbSGz62cZUIKh/vPcANbLq/dnMnFl+3SW/H yeRkgolbN38vOiw1x1BKHToMyuvaN4Scvn0+94AGYAeTIh0y34kQe650L50Ucakfdx F/t4GdHEdG8tAccNk0Mxa0fYZs6YaTLjBYb3M2Xk= Received: from send152.i.mail.ru (send152.i.mail.ru [89.221.237.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9EB16516A78 for ; Tue, 25 Nov 2025 16:56:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9EB16516A78 Received: by exim-smtp-5d7758579f-bx7gb with esmtpa (envelope-from ) id 1vNtXG-000000008nM-2d11; Tue, 25 Nov 2025 16:56:51 +0300 Content-Type: multipart/alternative; boundary="------------mN2bcJLMnIxYZhdFt3LS1Oy0" Message-ID: <5cc97979-5691-4945-aa7b-44b0eb191c73@tarantool.org> Date: Tue, 25 Nov 2025 16:56:50 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org References: Content-Language: en-US In-Reply-To: X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: 78E4E2B564C1792B X-77F55803: 4F1203BC0FB41BD93C79E2F7794E12225E4F564E6785C5D4139D59F677ABAF7C182A05F538085040D3A5C8E99913B10E3DE06ABAFEAF6705847EE6D2FE50AF76DDAC3DF676B0D5AB90585ADAF265B85E X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7ACA11F7F2395C8CCEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637F88016AB904663428638F802B75D45FF914D58D5BE9E6BC1A93B80C6DEB9DEE97C6FB206A91F05B25452327DC8C5C8FA2E070BE324C7D3C4F6761883F26D6F0BF6B57BC7E64490618DEB871D839B73339E8FC8737B5C224901F8F2FECC0250C8CC7F00164DA146DAFE8445B8C89999729449624AB7ADAF37F6B57BC7E64490611E7FA7ABCAF51C92176DF2183F8FC7C05A64D9A1E9CA65708941B15DA834481F9449624AB7ADAF37BA3038C0950A5D3613377AFFFEAFD269176DF2183F8FC7C0BCF2C0F5768D5B7A7B076A6E789B0E97A8DF7F3B2552694AD5FFEEA1DED7F25D49FD398EE364050F9647ADFADE5905B103CEA74F0D118906B3661434B16C20ACC84D3B47A649675FE827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8B56969FF77163EA2B75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A565F2890D440A9F575002B1117B3ED6967762F785605155A3F09842853758E9E5823CB91A9FED034534781492E4B8EEAD2B25D9E4C92BC8ACBDAD6C7F3747799A X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F96AB70F9BE574AE9C625B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D659DDDFFB7CB58721708DA286A08A9FB33F6DAEA4705A6A22C845A4A855B13DF6BC94D217C868BFF084B8341EE9D5BE9A0A8A03D129BB5F77CE1AF9E8710121A3897ADEF23A124C4B6A8CD93680B12512CF4C41F94D744909CE2512F26BEC029E55448553D2254B8D95CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVcWupAQoUeGvNfjvwFam4DU= X-Mailru-Sender: 811C44EDE0507D1FDF2E97A3E832A8A44D3A4A66E2DCA1BF91CF6C6A8F7D6EF6D08DDCB19FA10C2C744DAD48789798D7645D15D82EE4B272BD6E4642A116CA93524AA66B5ACBE6721EF430B9A63E2A504198E0F3ECE9B5443453F38A29522196 X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH luajit 1/3] macOS: Fix macOS 15 / Clang 16 build. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" This is a multi-part message in MIME format. --------------mN2bcJLMnIxYZhdFt3LS1Oy0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Sergey! Thanks for the patch! LGTM with a minor comment. Sergey On 11/24/25 23:26, Sergey Kaplun wrote: > From: Mike Pall > > 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 --------------mN2bcJLMnIxYZhdFt3LS1Oy0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

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


    
<snipped>

    
--------------mN2bcJLMnIxYZhdFt3LS1Oy0--