标签: compiler-flags

什么是-ll gcc的旗帜?

我正在尝试编译一个有-ll标志但gcc无法找到的程序.什么是l-l一个真正的图书馆或这是一个错字?很难在谷歌上找到关于这个的信息.这个术语是"模糊的".

linux gcc compiler-flags

4
推荐指数
1
解决办法
1636
查看次数

矩阵/向量运算的GCC优化标志

我正在使用C执行矩阵运算.我想知道什么是各种编译器优化标志,以提高双和int64数据的这些矩阵运算的执行速度 - 如乘法,反向等.我不是在寻找手动优化的代码,我只想使用编译器标志更快地生成本机代码,并了解有关这些标志的更多信息.

到目前为止我发现的标志改进了矩阵码.

-O3/O4
-funroll-loops
-ffast-math
Run Code Online (Sandbox Code Playgroud)

optimization gcc matrix linear-algebra compiler-flags

4
推荐指数
1
解决办法
5313
查看次数

如何正确使用scalac -Xlint

scalax -Xlint help提供以下信息:

$ scalac -Xlint:help
Enable or disable specific warnings
  adapted-args               Warn if an argument list is modified to match the receiver.
  nullary-unit               Warn when nullary methods return Unit.
  inaccessible               Warn about inaccessible types in method signatures.
  nullary-override           Warn when non-nullary `def f()' overrides nullary `def f'.
  infer-any                  Warn when a type argument is inferred to be `Any`.
  missing-interpolator       A string literal appears to be missing an interpolator id.
  doc-detached               A Scaladoc comment appears to be detached from its …
Run Code Online (Sandbox Code Playgroud)

scala compiler-flags scalac scala-compiler

4
推荐指数
1
解决办法
2660
查看次数

cmake 如何在 C++ 中将编译器标志附加到末尾

我想将编译器 C++ 标准设置为 gnu++17 但我不能这样做,CMAKE_CXX_STANDARD因为它给我的gnu++17是无效值。因此我把它放在CMAKE_CXX_FLAGS. 但是当我编译 cmakestd=gnu++11时,会像这样附加到命令的末尾:-

/bin/g++ -Wall -Wpedantic -Wextra -std=gnu++14 -no-pie   -fPIC -std=gnu++11 -o /path/to/main.cpp.o -c /blah/blahfeeelk
Run Code Online (Sandbox Code Playgroud)

从而std=gnu++11获胜。所以想追gnu++17加到最后。我怎样才能做到这一点 ?(我已经修剪了原始命令)

c++ standards cmake compiler-flags

4
推荐指数
1
解决办法
2796
查看次数

如何升级到 C++17?

我使用 Atom 作为我的 IDE,我当前__cplusplus = 201402是 C++14,我的编译器是g++ (GCC) 9.2.0

如何升级到 C++17 或 C++20?

我搜索的所有内容都涉及使用另一个 IDE(Microsoft Visual Studio)。

c++ compiler-flags atom-editor c++17

4
推荐指数
2
解决办法
6862
查看次数

.clangd:根据文件扩展名使用不同的编译器标志

我正在使用.clangd配置文件将编译标志传递给 clangd。

我在包含 C 和 C++ 文件的代码库上运行 clangd。

如何让一些标志应用于 C++ 文件而不是 C 文件?

c c++ configuration compiler-flags clangd

4
推荐指数
1
解决办法
4617
查看次数

如何在Visual Studio 2010中设置CUDA编译器标志?

持续获得后error : identifier "atomicAdd" is undefined,我发现解决方案是使用-arch sm_20flag 编译.但是如何在VS 2010中传递这个编译器标志?我曾经这样尝试过Project > Properties:

在此输入图像描述

但这显然没有效果,错误仍然存​​在 - 我做错了什么?

非常感谢.

cuda visual-studio-2010 compiler-flags

3
推荐指数
1
解决办法
9447
查看次数

Make:覆盖一个标志

我对快速覆盖-Werror标志的反应有点困惑

所以我在这里问我的具体问题.

我有多个Makefile一起工作,CFLAGS已经设置为(-Werror -Wall ..和许多其他人)

但是在其中一个Makefile中,我希望错误不被视为警告,所以我想删除-Werror标志.

实现这一目标的最佳方法是什么,以便只有这个Makefile,-Werror标志被删除,而其他人正常执行?

谢谢,Sunny

overriding makefile compiler-flags

3
推荐指数
1
解决办法
8886
查看次数

如何在Visual Studio中设置CUDA标志

我正在尝试在Visual Studio中测量我的CUDA项目中的寄存器溢出.为此,我使用标志-Xptxas -v,-abi = no,因为它是在这里写的 http://on-demand.gputechconf.com/gtc-express/2011/presentations/register_spilling.pdf

在我的VS 2010项目中,我尝试将此标志放入:

  1. properties/cuda/host /其他编译标志 - 没有效果.
  2. properties/cuda /命令行.编译以-1退出.
  3. properties/c /命令行.编译错误

在Cuda属性中,我还设置为Yes标志:生成GPU调试信息和Verbose PTXAS输出.我在输出窗口中寻找输出.怎么做得好?我的GPU有CC = 2.1.

编辑:所以将标志作为答案指示的正确位置是属性/ cuda /命令行.但我仍然没有得到预期的输出(即使在示例项目中).下面我展示了我在属性中的其他选项:cuda/device.

  1. C在PTXAS输出中交织 - 没有
  2. 代码生成 - compute_20,sm_21
  3. 生成GPU调试信息 - 是的
  4. 最大使用寄存器 - 0
  5. 详细的ptxas输出(是/否 - 测试两者).

cuda visual-studio-2010 compiler-flags

3
推荐指数
1
解决办法
3877
查看次数

如何将std = c ++ 11标志添加到clang-cl?

我试图用Windows下的clang-cl编译一个C++ 11程序.Clang-cl是clang的包装器,与cl(Visual Studio编译器)更兼容.我尝试添加-std=c++11/std=c++11无一不遭到拒绝.这并不奇怪,因为cl没有C++ 11标志.但我不能使用clang-cl的C++ 11功能.

如何在clang-cl中启用C++ 11支持?

windows clang compiler-flags c++11

3
推荐指数
1
解决办法
2141
查看次数