title: figure out ld command arguments from xcode run script build phase
body: <p>How can I determine what will be the arguments of the ld command in the build process from inside a script running as "run script build phase"? </p>
  
  <p>I was looking at <code>xcodebuild -dry-run</code> as an option, but then I need to understand what should be the arguments I supply it.  </p>
  
  <p>Any idea for a robust solution?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>It seems that xcodebuild doesn't support LD and LDPLUSPLUS when the project includes swift source code. So the solution that @fpotter offered doesn't work on project with swift. </p>
  
  <p>Any thoughts? </p>