Unable to remove types metadata and methods names from compiled binary

Hi. I'm trying to compile simple swift source file with stripping types metadata and names from it. I use these frontend flags:

swiftc -O -Xfrontend -disable-reflection-names -Xfrontend -disable-reflection-metadata -Xfrontend -reflection-metadata-for-debugger-only -Xfrontend -disable-generic-metadata-prespecialization -gnone test.swift

After compiling this test source file I still facing metadata and names in binary after dissembling it with Hopper. What I'm doing wrong? Please help.

I’m not 100% sure what’s going on here. There are a couple of different ways that metadata can end up in your built binary. At one point there was a proposal to control this, SE-0379 Swift Opt-In Reflection Metadata, but AFAICT it never landed.

My advice here is that you ask this question over on Swift Forums > Using Swift.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unable to remove types metadata and methods names from compiled binary
 
 
Q