如何在Linux平台上为g++配置优化的预处理器设置

在 Linux 平台上,为 g++ 配置优化的预处理器设置可以通过以下步骤实现:

  1. 打开终端。

  2. 创建一个新的文本文件,例如 g++-优化.conf,并使用文本编辑器(如 nano、vim 或 gedit)打开它。

  3. 在文件中添加以下内容:

# 设置预处理器宏
# 优化编译速度
GCC_CXXFLAGS="-O2 -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-strict-aliasing -Wno-unknown-pragmas -Wno-shadow -Wno-sign-compare -Wno-float-equal -Wno-conversion -Wno-non-virtual-dtor -Wno-move-const-object -Wno-split-strings -Wno-long-long -Wno-uninitialized -Wno-unknown-condition -Wno-unused-result -Wno-parentheses -Wno-enum-compare -Wno-shorten-64-to-32 -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-cast-qual -Wno-const-cast -Wno-function-template-args -Wno-non-template-functions -Wno-vla -Wno-array-bounds -Wno-trigraphs -Wno-char-subscripts -Wno-constexpr-not-constexpr -Wno-if-constexpr-condition -Wno-nested-namespace -Wno-noexcept-type-specifiers -Wno-noexcept-operator -Wno-noexcept-constant-condition -Wno-noexcept-placement -Wno-noexcept-return -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -Wno-noexcept-delete-virtual -Wno-noexcept-move-assignment -Wno-noexcept-move-construction -Wno-noexcept-swap -Wno-noexcept-rethrow -Wno-noexcept-return-type -Wno-noexcept-source-location -Wno-noexcept-function-type -Wno-noexcept-虚函数 -Wno-noexcept-虚析构函数 -Wno-noexcept-override -Wno-noexcept-final -Wno-noexcept-delete -Wno-noexcept-delete-non-virtual -W
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:niceseo6@gmail.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

评论

有免费节点资源,我们会通知你!加入纸飞机订阅群

×
天气预报查看日历分享网页手机扫码留言评论Telegram