[all-commits] [llvm/llvm-project] d2c4d1: [memprof] Export __memprof_default_options_str on ...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Mar 3 09:57:56 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d2c4d1ec48b7c723307121164099fb2fa7d959a9
      https://github.com/llvm/llvm-project/commit/d2c4d1ec48b7c723307121164099fb2fa7d959a9
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2025-03-03 (Mon, 03 Mar 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/Darwin.cpp
    M clang/test/Driver/fmemprof.cpp
    M llvm/include/llvm/ProfileData/MemProf.h
    M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp

  Log Message:
  -----------
  [memprof] Export __memprof_default_options_str on Darwin (#128920)

The `-memprof-runtime-default-options` LLVM flag introduced in
https://github.com/llvm/llvm-project/pull/118874 creates the
`__memprof_default_options_str` symbol with `WeakAnyLinkage` on Darwin.


https://github.com/ellishg/llvm-project/blob/fa0202169af23419c4bcbf66eabd1beb6b6e8e34/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp#L573-L576

This ensures Darwin passes `-exported_symbol
___memprof_default_options_str` to the linker so that the runtime
library has visibility into this symbol.

This will replace the earlier PR
https://github.com/llvm/llvm-project/pull/128615



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