In Xcode, you can add a compiler flag (specifically LDFLAGS) by specifying the Other Linker Flags in the Build Settings.
LDFLAGS
Other Linker Flags
How do I replicate