e2studio keeps building unchanged files on each build

 Hi,

I have a project with multiple build configurations. The differences between them are small, I use this for instance to build for several languages.

The problem I'm getting is that on every build on say FoobarUK it not only builds the objects that are out of date for FoobarUK, but also the ones that are out of date for FoobarDE. 

This is getting pretty annoying, because even if FoobarUK is fully up to date, if I build it many objects are compiled anyway on each build, only because FoobarDE is not up to date, and thus eats time.

I don't see any differences between the projects, except for the defines that determine the language. But I also have no clue where to look, so any help would be appreciated.

I'm using GCC for Renesas RX version 4.8.4.201801, on e2studio 7.1.0, but I saw this behavior on older versions as well. 

 

Peter

  • Hello, Peter.

    > because even if FoobarUK is fully up to date, if I build it many objects are compiled anyway on each build, only because FoobarDE is not up to date, and thus eats time.
    It is because each objects are placed in different places under each of build configuration named folders.

    For example, you could configure FoobarDE linker to use FoobarUK *.obj files for common objects and then exclude *.c files from FoobarDE, as stated below.

    1. Activate FoobarDE build configuration
    2. Open Linker setting at "Tool Settings"->"Linker"->"Source"->"Additional input files"
    3. Put the *.obj pathes in FoobarUK
    4. Choose a folder or a file in Project Explorer, then open the context menu of "Resource Configurations"->"Exclude from Build...".
    5. Check FoobarUK; The checked folder/source are excluded from the build configuration (checked ones are not compiled).

    Hope it works for you.

  • Hi Okra,

    Thanks for your answer, from what I understand of it, this is a solution to not have to build objects for each configuration if these objects are the same.

    But that is not the problem I'm facing. (Yes I have sharable objects that now have to be build for each configuration, but that on it's own doesn't bother me to much). So let me try to explain better which is the problem.

    1. Let's say I have a shared source "foo.c" which I change.
    2. I then build FoobarUK, and foo.c get's compiled as it should.

    3. If I now build FoobarUK again, foo.c get's compiled again, which shouldn't be necessary, since foo.o for FoobarUK is still up to date.

    4. I then build FoobarDE, and foo.c get's compiled as it should.
    5. If I build FoobarDE for the second time nothing get's build as everything is up to date.

    6. Now I come back to FoobarUK and build it, there is nothing being compiled because everything is still up to date.

    So my problem is the unnecessary compilation that's being done in step 3. And I don't understand why building FoobarUK somehow depends on FoobarDE.
  • Hello, Peter.
    > 3. If I now build FoobarUK again, foo.c get's compiled again
    This behavior tells that resource refresh path for the build configuration(s) do not match to actual folder structure.
    If the refresh path was wrong, builder cannot compare source files and try to build everything.
    You could fix this by configuring "Refresh Policy" (look at the same named tab in the project configuration "C/C++ Build").
    Need to configure source folder (for each build configurations), but can't edit. So, once remove wrong (lost link) folder and add the actual folder.
    Again, hope it works for you.

  • That's what I needed. Thanks a lot!

    I had no Resources filled in for any of my configuration btw. I added the output folder per configuration, and now it works.