title: xcode LLVM 5.1 clang error
body: <p>I am having no luck the last few days since Xcode 5.1 came out.</p>
  
  <p>I keep getting this error on an old project that supports iOS 6.0:</p>
  
  <pre><code>ERROR:
  
  clang: error: unknown argument: '-fno-obj-arc' [-Wunused-command-line-argument-hard-error-in-future]
  clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
  Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
  </code></pre>
  
  <p>There are not many posts about this on the internet and some suggestions seem to be to change your <code>CFLAGS</code> but I have no idea how to do that in Xcode.</p>
  
  <p>Apple suggests this from their documents:</p>
  
  <blockquote>
    <p>Compiler</p>
    
    <p>As of Apple LLVM compiler version 5.1 (clang-502) and later, the
    optimization level -O4 no longer implies link time optimization (LTO).
    In order to build with LTO explicitly use the -flto option in addition
    to the optimization level flag. (15633276) The Apple LLVM compiler in
    Xcode 5.1 treats unrecognized command-line options as errors. This
    issue has been seen when building both Python native extensions and
    Ruby Gems, where some invalid compiler options are currently
    specified. Projects using invalid compiler options will need to be
    changed to remove those options. To help ease that transition, the
    compiler will temporarily accept an option to downgrade the error to a
    warning:</p>
    
    <p><code>-Wno-error=unused-command-line-argument-hard-error-in-future</code></p>
    
    <p>Note: This option will not be supported in the future. To workaround
    this issue, set the ARCHFLAGS environment variable to downgrade the
    error to a warning. For example, you can install a Python native
    extension with:</p>
    
    <p><code>$ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName</code></p>
    
    <p>Similarly, you can install a Ruby Gem with:</p>
    
    <p><code>$ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName 16214764 updated</code></p>
  </blockquote>
  
  <p>How do I get this workaround?  Obviously Apple has messed up because it should only be presenting me with a warning and not an error according to their documents.</p>
  
  <p>Any help would be greatly appreciated.  I can not build my app until this issue is rectified.</p>