从源代码编译node.js时,如何将CFLAGS更改为-g -O0?

发布于 2024-11-27 13:40:34 字数 146 浏览 5 评论 0原文

我尝试过:

CFLAGS="-g -O0" ./configure

但在 make 时它仍然使用默认标志 ​​-g -O3

有办法解决吗?

I tried:

CFLAGS="-g -O0" ./configure

But it's still using the default flags -g -O3 when make.

Any way to work around?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骄兵必败 2024-12-04 13:40:34

./configure --debug

使用-g -O0自动构建

或者您可以在节点源树的根目录中编辑wscript,搜索并编辑其中包含“O3”的行,然后重新运行配置。这将使用您想要的参数构建源代码树,但没有 -Wall -Wextra -DDEBUG。以防万一这就是你想要的。

ps 我通过以下方式发现了这一点: find 。 -type f -print0 | xargs -0 grep "O3" 并运行一些简单的实验。

./configure --debug

That automatically builds with -g -O0

Or you can edit wscript in the root directory of the node source tree, search and edit the line with "O3" in it, and re-run configure. That will build your source tree with the arguments you want, but without -Wall -Wextra -DDEBUG. Just in case that's what you want.

p.s. I found this out by: find . -type f -print0 | xargs -0 grep "O3" and running a couple of simple experiments.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文