Uh oh!
There was an error while loading. Please reload this page.
Use the linker directly on darwin,ios - #46255
Conversation
e3d47db to
a665be5Comparekennytm
commented
Nov 25, 2017
This caused several errors on the CI which is running Linux 😕 |
tamird
commented
Nov 25, 2017
via email
Yep! Luckily I am able to reproduce these locally on macOS, so I'm
investigating now. …On Sat, Nov 25, 2017 at 9:47 AM, kennytm ***@***.***> wrote:
This caused several errors on the CI which is running Linux 😕
[00:59:08] failures:
[00:59:08] [run-make] run-make/fpic
[00:59:08] [run-make] run-make/print-cfg
[00:59:08] [run-make] run-make/simd-ffi
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#46255 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABdsPLc6Xd2otGu9Fs-FjtVovaHLbEelks5s6CiSgaJpZM4QqauE>
.
|
...outside of target specifications - that'll come next. Updates rust-lang#11937.
Some logic to deal with macOS < 10.8 cribbed from: https://github.com/llvm-mirror/clang/blob/64309d1/lib/Driver/ToolChains/Darwin.cpp#L1910 Updates rust-lang#11937.
a665be5 to
385c844Comparetamird
commented
Nov 25, 2017
I was able to repro |
tamird
commented
Nov 26, 2017
cc @TimNN |
alexcrichton
commented
Nov 27, 2017
Thanks for this, it looks pretty cool! My main worry here would be around the area of regressions. For example this would break anyone using For example I think we should enable Switching the iOS targets seems reasonable but we may wish to pursue the same strategy for now and then post on internals about how everyone's using |
TimNN
commented
Nov 27, 2017
Hey @tamird, do you need anything particular from me or was the |
tamird
commented
Nov 27, 2017
@TimNN nah, just thought you might have some opinions on iOS stuff (as I recall you've done some work in that area in the past). @alexcrichton sounds totally reasonable! one thing that was attractive about making |
alexcrichton
commented
Nov 28, 2017
@tamird yeah I'm quite surprised this worked to bootstrap! (that's awesome!) We could always tweak our own bootstrap to use this linker by default and avoid I was also thinking that right now the default linker is |
So this is kind of a bummer. In order to make ld "just work" on osx, we need to teach all the targets the correct ld args, which in general are just the cc args with some stuff removed. I say it's a bummer because it makes me think that "linker flavor", as implemented in rustc, is not a particularly good abstraction because generally (always?) there is only one linker on each platform, which we currently always front with cc. However, nearly all the flags we pass to cc have a direct mapping to an ld flag. Here's my proposal: we should remove linker flavor and go back to having a list of linker args per target as before, only this time the linker args will all be the ld variant, rather than the cc variant. Then, we can check at link time if the executable we're calling "looks like" cc or ld (or lld, or whatever) and map the ld flags to cc flags. Unfortunately, this will be a breaking change, as you say, with respect to how link args are pass on the command line today (since they'll need to be in We could also do this in the reverse direction (mapping cc flags to ld flags), I think, but I imagine it'll be somewhat uglier. What do you think? |
alexcrichton
commented
Nov 29, 2017
Sorry I don't currently have the time to evaluate what appears to be major refactorings of the backends and how we pass arguments around, it would be good to consult other compiler team members with these sorts of questions right now. |
kennytm
commented
Dec 6, 2017
Reassigning to another person randomly on the compiler team as @alexcrichton doesn't have time to evaluate this. r? @pnkfelix |
carols10cents
commented
Dec 12, 2017
Review ping for you @pnkfelix ! |
pnkfelix
commented
Dec 13, 2017
This PR looks fine to me, but I'm not an expert in this domain (in terms of the issues that need to be addressed for #46255 |
Reading the dialogue on this PR more carefully, I now realize I was a little too blasé in my pseudo-review (aka rubberstamp) above. Namely, addressing #46255 is not sufficiently high priority to justify injecting the kinds of breaking changes that @alexcrichtonhas described. @alexcrichton gave some suggestions for how to revise the PR so that it would not inject a breaking- change to stable code. @tamird responded, but it seemed like their alternative approach is still going to inject breakage onto stable clients? (Did I misread their comment that outlined an alternative strategy to what @alexcrichton had suggested?) So, high-level points + questions:
Update: sigh, everywhere that I wrote |
kennytm
commented
Dec 20, 2017
Because it doesn't always work - if the target platform requires more flags, the user has to specify them all. The (reduced) goal is to be able to pass exactly those flags and have most platforms just work. The other questions aren't for me to answer. |
kennytm
commented
Dec 20, 2017
Should this be raised to the team for discussion? (Due to holiday this will likely need to wait until January) |
tamird
commented
Dec 20, 2017
via email
Seems that way to me. …On Wed, Dec 20, 2017 at 10:18 AM, kennytm ***@***.***> wrote:
Should this be raised to the team for discussion? (Due to holiday this
will likely need to wait until January)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#46255 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABdsPOZz8TelY85OagZy1T12Iqofox72ks5tCSUwgaJpZM4QqauE>
.
|
kennytm
commented
Dec 20, 2017
Nominated @rust-lang/compiler. |
kennytm
commented
Jan 10, 2018
Triage ping @rust-lang/compiler! Just to remind you all about this PR 😁. |
We discussed this in the @rust-lang/compiler meeting. Conclusion was:
|
shepmaster
commented
Jan 20, 2018
Triage ping for @tamird — looks like there is some feedback the team would like to see before this PR lands; will you have time to implement them? |
shepmaster
commented
Jan 26, 2018
Thanks for the contribution, @tamird ! Unfortunately, since we haven't heard from you in a few weeks, I'm going to go ahead and close this to keep the queue tidy. Please fee free to re-open it when you have time to address the most recent feedback! |
alexcrichton
commented
Feb 11, 2018
@tamird#48125 is doing most of the refactoring that I was thinking about, would you be up for rebasing this once that lands? I think with that we shoudl be able to get all of the following working by default: where there we're using the system linker, the |
tamird
commented
Feb 11, 2018
@alexcrichton sure! Thanks for making me aware of that PR; I'll follow along and pick this up when that's merged. |
See individual commits. r? @alexcrichton cc @japaric
(pnkfelix adds: This is taking steps towards addressing #11937)