[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-28 Thread Teresa Johnson via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); teresajohnson wrote:

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-27 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: @tere

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: Yes,

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread Teresa Johnson via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); teresajohnson wrote:

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread Ellis Hoag via cfe-commits
@@ -17,3 +17,11 @@ // RUN: not %clangxx --target=x86_64-linux-gnu -fprofile-generate -fmemory-profile-use=foo %s -### 2>&1 | FileCheck %s --check-prefix=CONFLICTWITHPGOINSTR // CONFLICTWITHPGOINSTR: error: invalid argument '-fmemory-profile-use=foo' not allowed with '-fprof

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread Ellis Hoag via cfe-commits
@@ -1617,6 +1617,10 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args, } } + if (Sanitize.needsMemProfRt()) +if (hasExportSymbolDirective(Args)) + addExportedSymbol(CmdArgs, "___memprof_default_options_str"); ellishg wrote: @tere

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Ellis Hoag (ellishg) Changes 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 `WeakAn

[clang] [memprof] Export __memprof_default_options_str on Darwin (PR #128920)

2025-02-26 Thread Ellis Hoag via cfe-commits
https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/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://githu