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

Add zig linker support #13515

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Add zig linker support #13515

merged 2 commits into from
Sep 24, 2024

Conversation

RossComputerGuy
Copy link
Contributor

Adds support for Zig's linker (zld)

Merges #13493, #12293, and #12953.

Context from #13493 (comment)

What we really need here is to have a single PR that contains all the necessary changes:

* this patch

* the patch from [linkers: basic support for the 'zig cc' linker #12293](https://github.com/mesonbuild/meson/pull/12293)

* a patch to enable zig in the CI workflows, see [Add Zig to ubuntu-rolling image, CI test #12953](https://github.com/mesonbuild/meson/pull/12953)

And a second PR that adds zig to the CI images without adding it to the CI workflows, see #12953 again.

Currently everything is spread out quite a bit and it's difficult to get a handle on whether it all works.

@thesamesam
Copy link
Collaborator

Please don't use merge commits.

Copy link
Member

@eli-schwartz eli-schwartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, merge commits are explicitly a violation of the Contributing docs: https://mesonbuild.com/Contributing.html#keeping-pull-requests-up-to-date

We will NOT merge any PR that contains one.

@RossComputerGuy
Copy link
Contributor Author

In fact, merge commits are explicitly a violation of the Contributing docs: https://mesonbuild.com/Contributing.html#keeping-pull-requests-up-to-date

Sorry, didn't know that one. Should I squash/cherry pick instead?

@@ -50,6 +51,18 @@ dub_fetch dubtestproject
dub build dubtestproject:test1 --compiler=ldc2
dub build dubtestproject:test2 --compiler=ldc2

# zig

ZIG_ARCHIVE=$(wget -qO- https://ziglang.org/download/index.json | jq -r ".master[\"$(uname -m)-linux\"].tarball")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we want to pull master for this. That'll lead to flaky CI. If we do want that, it needs justification.

Copy link
Contributor Author

@RossComputerGuy RossComputerGuy Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we can probably use the latest release instead of master. I just need to figure out the jq to read the 2nd object.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, we're now using a tagged release instead of master.

@QuLogic
Copy link
Member

QuLogic commented Sep 17, 2024

Zig is in the CI image now, I think, so this just needs a rebase and dropping that last commit?

@RossComputerGuy
Copy link
Contributor Author

so this just needs a rebase and dropping that last commit?

Done

@dcbaker dcbaker merged commit f3daf62 into mesonbuild:master Sep 24, 2024
34 checks passed
@RossComputerGuy RossComputerGuy deleted the feat/zld branch September 24, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants