从源代码编译node.js时,如何将CFLAGS更改为-g -O0?
我尝试过:
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
./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.