News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

bug :: virual target rebuild : targets cleanup

Started by earlgrey, January 10, 2016, 09:17:38 AM

Previous topic - Next topic

earlgrey

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.


-------------- 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 Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

MortenMacFly

Quote from: earlgrey 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.
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

earlgrey

Apologizes, you are right, it is in :
Global compiler settings -> build Options -> Rebuild workspace / project
* OS = Debian Buster - Linux 4.19.06 x64 SMP
* C::B = svn11267 wx-3.0.4 - Linux, unicode 64 bit

oBFusCATed

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!]