- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在使用他们分发的 clang 3.5。我正在使用以下命令行将其安装在我的 travis 虚拟机中:
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 选项?
最佳答案
查看此提交:http://llvm.org/klaus/clang/commit/6590426aeb5275ec33dac2877f9349bbbb2d4b2e/#0-L-571
以前,该标志会被忽略,并且不会通知用户。现在通知用户它被忽略了。您不应该看到有或没有该标志的代码生成有任何差异。
它应该只是一个警告,但您已将其升级为带有 -Werror
的错误。
关于c++ - 不支持 clang 3.5 中的 -finline-functions?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26108606/
我注意到我的代码在 -O3 处中断,但没有在 -O2 处中断。我试着一个一个地应用标志,我发现 gcc -O1 -finline-functions code.c 休息;和 gcc -O1 -fno-
我正在使用 GCC 的 -finline-limit=N编译器选项。我正在编译我的代码并对其进行分析以检查 CPU 周期是否减少。当我增加 N 时,理想情况下,随着更大的函数被内联,我应该看到循环次数
我将 gcc 与 -finline-functions 优化一起用于发布构建。为了对抗代码膨胀,因为我在嵌入式系统上工作,我想说不要内联特定功能。显而易见的方法是通过函数属性,即 attribute(
我正在使用他们分发的 clang 3.5。我正在使用以下命令行将其安装在我的 travis 虚拟机中: sudo apt-add-repository 'deb http://llvm.org/apt
我是一名优秀的程序员,十分优秀!