New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 30840 - Merge r285254 and r285525 into the 3.9 branch
Summary: Merge r285254 and r285525 into the 3.9 branch
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: Driver (show other bugs)
Version: 3.9
Hardware: Macintosh MacOS X
: P normal
Assignee: Tom Stellard
URL:
Keywords:
Depends on:
Blocks: 30261
  Show dependency tree
 
Reported: 2016-10-30 18:54 PDT by Jack Howarth
Modified: 2016-11-21 15:30 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
backport of r285254 and r285525 (3.11 KB, patch)
2016-10-30 21:59 PDT, Jack Howarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2016-10-30 18:54:02 PDT
I would like to propose merging the changes...

r285254 | mehdi_amini | 2016-10-26 19:23:08 -0400 (Wed, 26 Oct 2016) | 8 lines

Unconditionally pass `-lto_library` to the linker on Darwin

We're only doing it with -flto currently, however it never "hurt"
to pass it, and users that are linking without -flto can get in
trouble if one of the dependency (a static library for instance)
contains bitcode.

Differential Revision: https://reviews.llvm.org/D25932

and the subsequent bug fix...

r285525 | mehdi_amini | 2016-10-30 19:26:13 -0400 (Sun, 30 Oct 2016) | 13 lines

Fix clang installed path to handle case where clang is invoked through a symlink

This code path is used when generating the path to libLTO.dylib, which
is passed to the linker as `-lto_library'.
Without this, if clang is invoked through a symlink, libLTO is
searched in a path relative to where the symlink is instead of
where clang is actually installed.

Fix PR30811.

Patch by: Jack Howarth

Differential Revision: https://reviews.llvm.org/D26116

to 3.9 branch for the 3.8.1 release
Comment 1 Jack Howarth 2016-10-30 21:59:23 PDT
Created attachment 17515 [details]
backport of r285254 and r285525
Comment 2 Jack Howarth 2016-10-31 14:12:24 PDT
to 3.9 branch for the 3.9.1 release
Comment 3 Mehdi Amini 2016-10-31 20:04:42 PDT
@tstellar: fine with me for cherry-picking in 3.9.1!

(This is interacting with the LTO linker on Darwin, which I own for Apple).
Comment 4 Mehdi Amini 2016-11-01 17:14:07 PDT
(Assigned to Tom)
Comment 5 Tom Stellard 2016-11-07 09:28:10 PST
Hi Jack,

Go ahead and merge this into the 3.9 branch.  If you are unable to do this, assign the bug back to me.
Comment 6 Jack Howarth 2016-11-16 14:50:54 PST
Assigning back to Tom so he can do the commits into the 3.9 branch for 3.9.1.
Comment 7 Jack Howarth 2016-11-21 12:54:22 PST
This is the last of my proposed back ports for 3.9 branch which have yet to be committed.
Comment 8 Mehdi Amini 2016-11-21 15:30:30 PST
r287579 and r287580