Author Topic: Compile N files at once  (Read 22701 times)

grv575

  • Guest
Re: Compile N files at once
« Reply #15 on: August 11, 2005, 08:35:32 pm »
If you don't at least notify the compilation threads to exit then the user may have to wait a long time for these threads to finish when there are errors (and he has fixed one or two and hits compile again).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Compile N files at once
« Reply #16 on: August 11, 2005, 08:35:54 pm »
(regarding -j)

Then I guess it's MinGW's job, not ours... besides, we're already having enough trouble with the only thread implementation we're using (code completion). Also, i'd vote for the j parameter because remember, we're supposed to be cross-platform.

grv575

  • Guest
Re: Compile N files at once
« Reply #17 on: August 12, 2005, 07:18:58 am »
No, but read that link (www.gnu...).  make -j does not work on windows.  That would defeat the cross platform compatibility.

takeshimiya

  • Guest
Re: Compile N files at once
« Reply #18 on: August 12, 2005, 07:47:38 am »
Currently it works on windows, using Cygwin's make.
And I suppose that probably in MinGW's make also (not sure).

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Compile N files at once
« Reply #19 on: August 12, 2005, 08:56:22 am »
wxWidgets has some options not available on all platforms. What happens is that it ignores such options instead of giving an error, this allows people to try to use the best options for each platform, without neglecting others.

Anyway, let's first get rid of the crashes and later we'll think about multiprocessing for future versions. Right? :)

takeshimiya

  • Guest
Re: Compile N files at once
« Reply #20 on: August 12, 2005, 10:04:13 pm »
Yeah  :)

zieQ

  • Guest
Re: Compile N files at once
« Reply #21 on: August 22, 2005, 04:18:40 pm »
When the thread poll discussed in another thread will be implemented, we would be able to provide faster compilation of source files, even with inter-target dependencies.

Threads from the poll would have (as a task) to compile one file from the current target, and at end of all compilations, there would be a synchronization so that the linker could be called as one task. For inter-target dependencies, we may:
- wait for the dependency targets to be compiled and linked prior to the compilation of the current project (as it is now)
- or ensure that the linker command for the current project is called after the linker commands of dependency targets. In this case we may have errors reported more than once since distincts targets could use the same (.h) files.

I would also advocate for a buffer log for each compilation task: the error display would be modified only when a task has finished, so that there's no interleaved error messages from different tasks.

To conclude, it should be possible and not so hard to implement that, provided that a thread poll and a synchronization mecanism after compilation are implemented. Another todo for the compiler plugin redesign  :D

zieQ

  • Guest
Re: Compile N files at once
« Reply #22 on: August 22, 2005, 05:32:36 pm »
Oh, forget my remark about thread poll, wxExecute deals with processes and not threads. However i will take that the remark into account when working on the new compiler plugin.