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

Michael Klemm via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 04:17:48 PST 2023


mjklemm 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.  T think we should rather inject the proper linker equivalent of --whole-archive on Darwin, too.

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.

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


More information about the cfe-commits mailing list