GNU make's -j option

前端 未结 6 553
走了就别回头了
走了就别回头了 2021-01-31 07:21

Ever since I learned about -j I\'ve used -j8 blithely. The other day I was compiling an atlas installation and the make failed. Eventually I tracked it down to things being ma

6条回答
  •  庸人自扰
    2021-01-31 08:11

    In short - make sure that your dependencies are correct and complete.

    If you are using a single threaded make then you can be blindly ignoring implicit dependencies between targets. When using parallel make you can't rely on the implicit dependencies. They should all be made explicit. This is probably the most common trap. Particularly if using .phony targets as dependencies.

    This link is a good primer on some of the issues with parallel make.

提交回复
热议问题