【发布时间】:2014-09-29 20:48:09
【问题描述】:
我正在使用他们分发的 clang 3.5。我正在使用以下命令行将其安装在我的 travis vm 中:
sudo apt-add-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main'
sudo apt-add-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.5 main'
当我在启用优化的情况下运行测试构建时,出现以下错误:
clang: error: optimization flag '-finline-functions' is not supported
"clang++" -c -x c++ -std=c++1y -Werror -O3 -finline-functions -Wno-inline -Wall -Werror -pthread -fPIC -std=c++1y -DBOOST_ALL_DYN_LINK -DNDEBUG -I"." -I"gamgee" -I"lib/htslib" -o "test/bin/run.test/clang-linux-3.5.0/release/threading-multi/sam_builder_test.o" "test/sam_builder_test.cpp"
我在运行旧 3.4 版本的 clang 的 Mac 上没有遇到同样的错误。
clang 是否在 3.5 中取消了对 -finline-functions 的支持?这是有关此软件包构建的特定内容吗?应该如何用 clang-3.5+ 替换 -finline-functions 选项来优化构建?
【问题讨论】: