Similar to the reason behind moving __llvm_profile_filename into a separate file[1]. When users use Full LTO with BFD linker to generate IR level PGO profile, the __llvm_profile_raw_version variable, which is used for marking instrumentation level and generated by frontend, would somehow conflict with the weak symbol provided by the profiling runtime. To go a little more details, in many cases, BFD linkers will pick profiling runtime's weak symbol as the real definition of __llvm_profile_raw_version rather than the one generated by frontend and thus generate the incorrect instrumentation level metadata in the final executables.
Moving __llvm_profile_raw_version into a separate file would make linkers not seeing the weak symbol in the archive unless the frontend doesn't generate one.
The test does not work if