简体   繁体   中英

Why am I seeing a compilation error about -falign-loops using LLVM?

I have an iOS application that uses Core Plot, and after I upgraded to Xcode 4.5, I'm seeing the following error when building:

clang: error: argument unused during compilation:
'-falign-loops=16' Command
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u‌​sr/bin/clang
failed with exit code 1

What can cause this and how can I fix it?

-falign-loops is a GCC option not used by clang. It is normally a warning in clang, so I assume you have the compiler option set to treat warnings as errors ( -Werror ).

I had the same issue using CorePlot, the following solved the problem

  • Go to CorePlot-CocoaTouch Project
  • Build Settings
  • Scroll down to Build Options
  • Compiler for C/C++/Objective-C set its value to LLVM GCC 4.2

Hope it resolves your issue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM