3

为什么 make 有时加上 -j 选项就不打印错误了,去掉就打印了?

 2 years ago
source link: https://www.v2ex.com/t/798686
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  Linux

为什么 make 有时加上 -j 选项就不打印错误了,去掉就打印了?

  VKRUSSIA · 1 天前 · 911 次点击

怎么才能不去掉-j 选项的前提下打印错误?

3 条回复    2021-08-29 20:40:35 +08:00

matthewgao

matthewgao   1 天前

有点没能理解 我觉得反过来倒是很可能的

seers

seers   1 天前   ❤️ 1

提供的信息可以得出加上-j 不会产生编译错误(doge

pezy

pezy   1 天前 via iPhone   ❤️ 6

多核编译的时候,输出大概率是无序的,输出错误不会立刻停止,还会输出很多。一般人只看最后就容易找不到错误在哪。不加,严格按顺序,出错就立刻停止,比较明显。

一般来说 C/C++编译器都有增量编译,你可以先用 -j,make 失败后想看错误是啥再来一次不带 -j 的即可很快看到。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK