How to remove '-serialize-debugging-options' flag when building via Xcode

I want to change the compiler flag '-serialize-debugging-options' to '-no-serialize-debugging-options', and I put the 'Xfrontend -no-serialize-debugging-options' in Other swift flags of Xcode build setttings, I found the build output add my flag to compiler but '-serialize-debugging-options' is still there, just like

/Applications/ -no-serialize-debugging-options -serialize-debugging-options

Is there a way to remove '-serialize-debugging-options' flag?

1 Like

I had the same issue, it seems adding SWIFT_SERIALIZE_DEBUGGING_OPTIONS in the target User-Defined Build Settings in Xcode and setting it to NO fixes the issue.

Thanks so much, it works!