[clang] [profile] runtime counter relocation is needed on windows-msvc targets (PR #127858)
Martin Storsjö via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 13:05:10 PDT 2025
mstorsjo wrote:
> > So I believe this should be generalized to all of Windows (and/or generalized to check for a COFF object file format?) instead of singling out specifically MSVC only.
>
> Thanks for checking. I can fix the condition but can you please let me know which of the two options you listed is better?
I don't entirely know as I'm not familiar with what `-runtime-counter-relocation`; the main case where the distinction matters is e.g. if using ELF object files on Windows. (This isn't usually done for regular executables, but it can happen e.g. within a JIT.) I would perhaps just go with `isOSWindows()` here, that's the much more common condition. Then for the testcase, you can add a test with a `<arch>-windows-gnu` triple. Thanks!
https://github.com/llvm/llvm-project/pull/127858
More information about the cfe-commits
mailing list