The compiler does not take the source code changes into account when rebuilding a project (FPC3.2.2)
Summary
The compiler does not take the source code changes into account when rebuilding a project.
System Information
- Operating system: Windows 7 professional 64 bits
- Processor architecture: x86-64
- Compiler version: 3.2.2 32 bits
- Device: Computer
Steps to reproduce
To test it, unzip the attached file, change dir to CommandLine\Lazarus folder and run build.bat run the project1.exe to see the output then uncomment/comment the line 17 of unit1.pas (in ReadWrite folder) and build and run again. The output is the same as the first time.
Tested also with Lazarus 2.2.2 (rev lazarus_2_2_2) FPC 3.2.2 i386-win32-win32/win64 and the results are the same.
If we clean the output units in lib\i386-win32 and the project1.exe and rebuild again, it works as expected.
Example Project
build.bat (command line used to build the project.)
set CURDIR=%~dp0
fpc.exe -MObjFPC -Scghi -O1 -gw3 -gl -l -vewnhibq -Fi%CURDIR%\..\..\lib\i386-win32 -Fu%CURDIR%\..\..\CommandLine\Lazarus\ -FU%CURDIR%\..\..\lib\i386-win32\ -FE%CURDIR%\..\..\CommandLine\Lazarus\ -o%CURDIR%\..\..\CommandLine\Lazarus\project1.exe project1.lpr
What is the current bug behavior?
When we change the source code of unit1 the output does not change. the compiler does not take changes into account.
What is the expected (correct) behavior?
The output must change if we change the source code