Author Topic: bug :: virual target rebuild : targets cleanup  (Read 1876 times)

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 88
bug :: virual target rebuild : targets cleanup
« on: January 10, 2016, 09:17:38 am »
If you make a virtual target, and rebuild it, targets are cleaned BEFORE all the targets builds ; so the first target build is correct, but starting from the second target build, the .o files of the first target build are re-used.
 
Code: [Select]
-------------- Clean: devel-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - devel-ms"

-------------- Clean: debug-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - debug-ms"

-------------- Clean: release-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
Cleaned "cb-oflp-plugin - release-ms"

-------------- Build: devel-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -g -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN {...} -o obj\src\oflp-log.o
{...}
mingw32-g++.exe -g -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DBUILDING_PLUGIN {...} -o obj\src\oflp-settings.o
mingw32-g++.exe -shared   -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0  -lcodeblocks -lwxmsw28u
Output file is plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}

-------------- Build: debug-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
{ MISSING MODULES COMPILATION HERE }
mingw32-g++.exe -shared   -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0  -lcodeblocks -lwxmsw28u
Output file is plugin\debug\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}

-------------- Build: release-ms in cb-oflp-plugin (compiler: GNU GCC Compiler)---------------
{ MISSING MODULES COMPILATION HERE }
mingw32-g++.exe -shared   -Wl,--dll {...} -o plugin\devel\ms\x32_4.9.2\OpenFilesListPlus.dll -mthreads -fmax-errors=0  -lcodeblocks -lwxmsw28u
Output file is plugin\release\ms\x32_4.9.2\OpenFilesListPlus.dll with size 4.12 MB
Running target post-build steps
{...}

Process terminated with status 0 (0 minute(s), 22 second(s))
0 error(s), 0 warning(s) (0 minute(s), 22 second(s))
In the rebuild process, each target cleanup should occur just before the target build.
* OS = Debian Jessie - Linux 3.15.5 x64 SMP
* C::B = svn10631 wx-( 2.8.12 / 3.0.2 )-( Linux, unicode ) 64 bit + http://forums.codeblocks.org/index.php/topic,20608.15.html

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: bug :: virual target rebuild : targets cleanup
« Reply #1 on: January 10, 2016, 10:40:31 am »
If you make a virtual target, and rebuild it, targets are cleaned BEFORE all the targets builds ; so the first target build is correct, but starting from the second target build, the .o files of the first target build are re-used.
To my knowledge thats an option you can change in the compiler options... Can't look ATM - no C::B at hand.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline earlgrey

  • Multiple posting newcomer
  • *
  • Posts: 88
Re: bug :: virual target rebuild : targets cleanup
« Reply #2 on: January 10, 2016, 10:46:37 am »
Apologizes, you are right, it is in :
Global compiler settings -> build Options -> Rebuild workspace / project
* OS = Debian Jessie - Linux 3.15.5 x64 SMP
* C::B = svn10631 wx-( 2.8.12 / 3.0.2 )-( Linux, unicode ) 64 bit + http://forums.codeblocks.org/index.php/topic,20608.15.html

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11932
    • Travis build status
Re: bug :: virual target rebuild : targets cleanup
« Reply #3 on: January 10, 2016, 11:37:49 am »
Generally it is better to setup your targets to output object files in different directories.
So in the future if we add parallel compilation of targets they'll still build fine.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]