[all-commits] [llvm/llvm-project] 5eca8b: [PGO][HIP] Fix profile-only Windows link by gating...
Yaxun (Sam) Liu via All-commits
all-commits at lists.llvm.org
Mon Jun 1 09:55:38 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5eca8b67ff3c5f371141d54b6e4544a0ebe77fdb
https://github.com/llvm/llvm-project/commit/5eca8b67ff3c5f371141d54b6e4544a0ebe77fdb
Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
Date: 2026-06-01 (Mon, 01 Jun 2026)
Changed paths:
M compiler-rt/lib/profile/CMakeLists.txt
Log Message:
-----------
[PGO][HIP] Fix profile-only Windows link by gating ROCm interceptor macro (#200859)
PR #200111 stops compiling InstrProfilingPlatformROCm.cpp (which defines
the
HIP GPU helper __llvm_profile_hip_collect_device_data) in profile-only
builds.
But the compile define -DCOMPILER_RT_BUILD_PROFILE_ROCM=1 was still
added
whenever the COMPILER_RT_BUILD_PROFILE_ROCM option was on (the default),
so
InstrProfilingFile.c still referenced the helper from
__llvm_profile_write_file
even though it was never built.
On ELF the declaration is weak, so the undefined symbol folds to null
and the
address-guarded call is skipped. COFF/Windows has no such fallback:
error LNK2019: unresolved external symbol
__llvm_profile_hip_collect_device_data referenced in function
__llvm_profile_write_file
Add the define only when PROFILE_HAS_HIP_INTERCEPTOR is true, i.e. the
same
condition that keeps InstrProfilingPlatformROCm.cpp in the archive, so
the
macro is defined iff the helper is actually compiled in.
Reported by zmodem:
https://github.com/llvm/llvm-project/pull/200111#issuecomment-4593893230
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list