[PATCH] D23531: [Darwin] Stop linking libclang_rt.eprintf.a

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 16 11:11:53 PDT 2016


Today, the code includes the eprintf archive on all linker invocations for i386 that include the OS X archive.

Removing the eprintf library from the command and including eprintf only for i386 in the OS X archive should be equivalent to what we have today.

-Chris

> On Aug 16, 2016, at 8:27 AM, Daniel Dunbar via cfe-commits <cfe-commits at lists.llvm.org> wrote:
> 
> The original motivation for organizing things this way was to try and always be in the situation where, when linking against the latest deployment target, we should never need the extra library (because the content will be present in libSystem). This is useful in helping to ensure we don't unnecessarily embed copies of system provided functions.
> 
> I know it is quite cumbersome to maintain that policy, but have we explicitly given it up? Nick, what is your opinion here?
> 
>  - Daniel
> 
> On Mon, Aug 15, 2016 at 3:51 PM, Chris Bieneman <beanz at apple.com <mailto:beanz at apple.com>> wrote:
> beanz created this revision.
> beanz added reviewers: ddunbar, bob.wilson.
> beanz added a subscriber: cfe-commits.
> 
> The eprintf library was added before the general OS X builtins library existed as a place to store one builtin function. Since we have for several years had an actual mandated builtin library for OS X > 10.5, we should just merge eprintf into the main library.
> 
> This change will resolve PR28855.
> 
> As a follow up I'll also patch compiler-rt to not generate the eprintf library anymore.
> 
> https://reviews.llvm.org/D23531 <https://reviews.llvm.org/D23531>
> 
> Files:
>   lib/Driver/ToolChains.cpp
> 
> Index: lib/Driver/ToolChains.cpp
> ===================================================================
> --- lib/Driver/ToolChains.cpp
> +++ lib/Driver/ToolChains.cpp
> @@ -483,8 +483,6 @@
>      if (isMacosxVersionLT(10, 5)) {
>        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.10.4.a");
>      } else {
> -      if (getTriple().getArch() == llvm::Triple::x86)
> -        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.eprintf.a");
>        AddLinkRuntimeLib(Args, CmdArgs, "libclang_rt.osx.a");
>      }
>    }
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160816/fe4097da/attachment-0001.html>


More information about the cfe-commits mailing list