I am using Xcode to build a project that links precompiled object files. These object files contain some unresolved symbols that are dead-code. When Xcode builds for the iOS Device, it strips them when linking and everything works smoothly. When building for the Simulator, however, it doesn't strip them (-dead_strip is not passed to the linker) even though the option (Dead Code Stripping) is activated in the project configuration. If I manually add -dead_strip to the link command on the terminal it builds and runs correctly in the simulator.
How do I make Xcode pass -dead_strip as argument to the linker when building for the iOS Simulator? I prefer a clean solution, hot a hack.