No gcda profile files created when PGO+LTO is enabled on Windows
Julian Waters
tanksherman27@gmail.com
Sun Mar 15 16:28:06 GMT 2026
While compiling binutils 2.46 for a Windows host and targeting
Windows, I noticed that there are no gcda files created to store
profiling information, and the later optimization stage will not have
any profile data to optimize with whatsoever:
../../../binutils-2.46.0/binutils-2.46.0/ld/pdb.c: In function
'create_pdb_file':
../../../binutils-2.46.0/binutils-2.46.0/ld/pdb.c:5411:1: warning:
'C:\Users\vertig0\Downloads\Windows\build\binutils\ld\pdb.gcda'
profile count data file not found [-Wmissing-profile]
5411 | }
| ^
There is a warning like the above for every source file within
binutils, so I didn't include the full trace (I'll be happy to if
needed, though). I can't really tell if this is a bug on Windows or if
I'm doing something wrong, though. From what I can tell it doesn't
seem to be an issue with how I'm compiling binutils though, which on
my Windows laptop is:
../../binutils-2.46.0/binutils-2.46.0/configure
--prefix=/c/Users/vertig0/Downloads/Windows/gcc --disable-rpath
--enable-deterministic-archives --enable-lto --disable-nls
--enable-plugins --enable-64-bit-bfd --enable-pgo-build=lto
--disable-werror
make -j8
make install
(Also sending this to H. J. Lu, who implemented PGO and LTO for binutils)
best regards,
Julian
More information about the Binutils
mailing list