Created
March 12, 2014 06:59
-
-
Save introom/9502141 to your computer and use it in GitHub Desktop.
Fix this error "clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]" with ARCHFLAGS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compiler | |
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: | |
-Wno-error=unused-command-line-argument-hard-error-in-future | |
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: | |
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future easy_install ExtensionName | |
Similarly, you can install a Ruby Gem with: | |
$ ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install GemName 16214764 updated | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment