Toolchain with ldc and AArch64 OSX
    Danilo 
    codedan at aol.com
       
    Sun Jul  9 11:18:37 UTC 2023
    
    
  
Forgot the following flags:
`-L=-merge_zero_fill_sections -L=-no_exported_symbols 
-L=-no_eh_labels -L=-dead_strip_dylibs`
So the full command is:
```
ldc2 --release --O3 --flto=full -fvisibility=hidden 
-defaultlib=phobos2-ldc-lto,druntime-ldc-lto -L=-dead_strip -L=-x 
-L=-S -L=-lz -L=-merge_zero_fill_sections -L=-no_exported_symbols 
-L=-no_eh_labels -L=-dead_strip_dylibs main.d
```
resulting in a executable of 588KB.
    
    
More information about the Digitalmars-d-learn
mailing list