[clang] [flang][driver] Don't use -whole-archive on Darwin (PR #75393)

Andrzej Warzyński via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 04:39:33 PST 2023


banach-space wrote:

> > > LGTM. Worked fine on my machine.
> > 
> > 
> > > 
> > 
> > 
> > > NOTE: tested by replacing `CommonArgs.cpp` in main, to avoid conflicts.
> > 
> > 
> > Thanks for checking and apologies for the merge conflict - I thought that I was up to date :( I've just rebased and force-pushed.
> > I will be landing this today if there are no further comments 🙏🏻
> 
> This patch seems to hide the original problem of the compiler not erroring out when multiple definitions of main happen.

To clarify - this patch is a warkaround to avoid reverting https://github.com/llvm/llvm-project/pull/73124. And to buy ourselves some time. I did a bit of research and couldn't find any equivalents for Darwin for `-whole-archive` :( I am a bit concerned that this might be the only option TBH, but hopefully I am wrong.

> I'd be OK to land this patch for now, if we agree to have a follow up PR to (re-)instantiate the error handling also for Darwin.

That would be ideal, but I won't have the bandwidth for that. We'll need a volunteer. Another option is to revert #73124. Either way, we need to unblock our Darwin users ASAP :)

https://github.com/llvm/llvm-project/pull/75393


More information about the cfe-commits mailing list