您的位置:首页 > Web前端 > Node.js

Build node.js with clang.

2014-07-05 13:59 1186 查看
Since I chose clang as my favorite compiler,

The default compiler of node.js is g++, so it needs a little trick to force node.js to use clang. Here is it:

1. Run configure with clang support.

CC=clang ./configure --prefix=/usr


2. Specify complier.
Be sure you didn't install g++, then you can do so:

sudo ln -n /usr/bin/clang /usr/bin/g++
CC=clang make


3. Finally, make && make install.

(Don't forget to remove the fake g++ link).

make && sudo make install
sudo rm /usr/bin/g++


Good luck!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: