This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 8a389b3f546 branch-4.1: [fix](build) add -dead_strip on macOS to fix 
dyld cache crash for large BE binary #61742 (#68218)
8a389b3f546 is described below

commit 8a389b3f5464c28454b54e182eb48dd612bfcb8b
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Sep 20 09:56:53 2026 +0800

    branch-4.1: [fix](build) add -dead_strip on macOS to fix dyld cache crash 
for large BE binary #61742 (#68218)
    
    Cherry-picked from #61742
    
    Co-authored-by: 924060929 <[email protected]>
---
 be/CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 555b2508f9d..0da7cdd2b0f 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -685,6 +685,11 @@ else()
         -lresolv
         -liconv
     )
+    # On macOS arm64, large binaries (>2GB) can cause the virtual address space
+    # to overlap with the dyld shared cache region, resulting in "dyld cache 
not
+    # loaded: syscall to map cache into shared region failed". Use -dead_strip 
to
+    # remove unreachable code/data and reduce binary size.
+    add_link_options(-Wl,-dead_strip)
 endif()
 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to