Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use embedded LLD for linking #1837

Open
sylvanc opened this issue Apr 12, 2017 · 15 comments
Open

Use embedded LLD for linking #1837

sylvanc opened this issue Apr 12, 2017 · 15 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sylvanc
Copy link
Contributor

sylvanc commented Apr 12, 2017

https://lld.llvm.org

This would eliminate the compiler's dependence on a C compiler for linking on Linux and on link.exe for linking on Windows.

LLD could be used as a library rather than needing to shell out to it.

@malthe
Copy link
Contributor

malthe commented May 22, 2017

LLD is still buggy on Mac: https://bugs.llvm.org/show_bug.cgi?id=32376

@sblessing
Copy link
Contributor

sblessing commented Apr 30, 2018

Hey guys,

slowly but surely returning to this project: I have implemented this and just need to test it on Windows. This issue can be assigned to me and I make sure to submit a pull request soon.

Looks good on OSX, Linux and BSD!

@jemc
Copy link
Member

jemc commented Apr 30, 2018

Hey @sblessing! Welcome back.

I've sent you an invite to the org so you can be assigned this ticket. Once you accept, write back here and I'll assign you.

@Cogitri
Copy link

Cogitri commented Jun 7, 2019

Hello,

due to ld.gold being rather buggy on musl (it just plain crashes if built without -fPIE: ld.gold: fatal error: build/release/stable: No error information) Alpine would be very interested in this too (or maybe I can somehow work around this for now by doing position executable binaries with ponyc? I don't know ponyc too well, sorry for my little knowledge :)

@SeanTAllen
Copy link
Member

Yes, PIE is support already @Cogitri. If you pass default_pic=true to make when building Pony, it will use when linking all binaries. See https://www.ponylang.io/faq/#pic-compile-error

@Cogitri
Copy link

Cogitri commented Jun 7, 2019

Hm, I already build ponyc with that option and just tried with ponyc --pic and it resulted in the same build error for pony-stable. Adding CFLAGS=-fPIE did the trick for ponyc, but I guess this leaves us with a non-functional compiler nontheless :/

@SeanTAllen
Copy link
Member

We build and release for alpine all the time, so I'm not sure what issue you are running into. I suggest checking https://github.com/ponylang/ponyc/blob/master/.dockerhub/alpine/Dockerfile. Beyond that, please open a new issue as this is off topic for this issue.

@Cogitri
Copy link

Cogitri commented Jun 7, 2019

Ah, sorry, I felt this was related to this due to using LLD as linker would fix this. I'll open a new issue.

@SeanTAllen
Copy link
Member

No need to apologize @Cogitri. We have veered off from LLD though.

@sblessing
Copy link
Contributor

sblessing commented Jun 14, 2019

I do have a running implementation with LLD. Unfortunately LLD is not yet where we need it to be and, and using LLD wouldn't remove vcvars.* :(

But I do think that LLD 9.0.0 looks promising.

@SeanTAllen
Copy link
Member

@sblessing any update on LLD 9.0.0?

@sblessing
Copy link
Contributor

@SeanTAllen Yes. I do have various examples running and so far it looks good. Do we need an RFC to eventually get this merged (and potentially at first have this as an experimental ponyc option)

@mfelsche
Copy link
Contributor

mfelsche commented Mar 3, 2020

I think an RFC would make sense to clarify how/if to expose it to users of ponyc (as an experimental flag or just replace using the system linker).
I know I tend to avoid the RFC-route, but in this case I would be fine to bring it in without RFC if it is only enabled via experimental option flag.

@SeanTAllen SeanTAllen added needs discussion Needs to be discussed further enhancement New feature or request and removed enhancement: 1 - needs discussion labels May 12, 2020
@SeanTAllen
Copy link
Member

@SeanTAllen SeanTAllen added the help wanted Extra attention is needed label Jan 22, 2022
@SeanTAllen SeanTAllen self-assigned this Jan 25, 2022
@3052

This comment was marked as off-topic.

@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Dec 20, 2023
@SeanTAllen SeanTAllen removed the discuss during sync Should be discussed during an upcoming sync label Dec 20, 2023
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jul 15, 2024
@SeanTAllen SeanTAllen removed needs discussion Needs to be discussed further discuss during sync Should be discussed during an upcoming sync labels Jul 16, 2024
@ponylang-main ponylang-main added the discuss during sync Should be discussed during an upcoming sync label Jul 16, 2024
@SeanTAllen SeanTAllen changed the title Use LLD for linking Use embedded LLD for linking Jul 16, 2024
@ponylang ponylang deleted a comment from stefantalpalaru Jul 16, 2024
@ponylang ponylang deleted a comment from stefantalpalaru Jul 16, 2024
@jemc jemc removed the discuss during sync Should be discussed during an upcoming sync label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

9 participants