GNU make's -j option

前端 未结 6 540
走了就别回头了
走了就别回头了 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 07:50

    I think make -j will respect the dependencies you specify in your Makefile; i.e. if you specify that objA depends on objB and objC, then make won't start working on objA until objB and objC are complete.

    Most likely your Makefile isn't specifying the necessary order of operations strictly enough, and it's just luck that it happens to work for you in the single-threaded case.

提交回复
热议问题