This revision was automatically updated to reflect the committed changes.
Closed by commit rGd51054217403: [Fuchsia] Rely on linker switch rather than
dead code ref for profile runtime (authored by phosek).
Changed prior to commit:
https://reviews.llvm.org/D79835?vs=267336=268591#toc
MaskRay added inline comments.
Comment at: clang/lib/Driver/ToolChains/Fuchsia.cpp:372
+ llvm::opt::ArgStringList ) const {
+ // Add linker option -u__llvm_profile_runtime to cause runtime
+ // initialization module to be linked in.
mcgrathr updated this revision to Diff 267336.
mcgrathr added a comment.
comment update
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79835/new/
https://reviews.llvm.org/D79835
Files:
clang/lib/Driver/ToolChains/Fuchsia.cpp
phosek accepted this revision.
phosek added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp:1037
bool InstrProfiling::emitRuntimeHook() {
// We expect the linker to be invoked with -u flag
mcgrathr created this revision.
mcgrathr added a reviewer: phosek.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.
Follow the model used on Linux, where the clang driver passes the
linker a `-u` switch to force the profile runtime to be linked