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

chore: update nightly to 2021-09-22 #117

Merged
merged 3 commits into from
Sep 27, 2021
Merged

chore: update nightly to 2021-09-22 #117

merged 3 commits into from
Sep 27, 2021

Conversation

hawkw
Copy link
Owner

@hawkw hawkw commented Sep 26, 2021

so, per @mystor, the nightly bump works if we switch to linking with GNU ld.

i spent a while struggling with trying to get rust-lld to work by passing the -z nostart-stop-gc argument, but rust-lld claims it doesn't know about that.

after adding this to the target JSON:

    "linker-flavor": "ld.lld",
    "linker": "rust-lld",
    "post-link-args": {
        "ld.lld": [
            "-z nostart-stop-gc"
        ]
    },

i get

 <...massive horrible linker invocation> "--gc-sections" "-z nostart-stop-gc"
  = note: rust-lld: error: unknown -z value:  nostart-stop-gc


error: could not compile `mycelium-kernel` due to previous error

which seems surprising given that

Require -z start-stop-gc, which is available in trunk ld.lld (https://reviews.llvm.org/D96914) and GNU ld newer than 2021-03-01 (https://sourceware.org/bugzilla/show_bug.cgi?id=27451)
(per some random googling i did https://reviews.llvm.org/D96914)

so, whatever, GNU ld works. but it would be nice if we could make rust-lld work again...

This just updates Rust to the latest nightly, and fixes a new Clippy
lint on that nightly.
this fixes the build on recent nightlies --- it appears the linker hax
we use for tests breaks on recent `rust-lld`s due to upstream changes.
see dtolnay/linkme#41 for details on a similar
issue.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
@hawkw hawkw requested a review from mystor September 26, 2021 19:41
@mystor
Copy link
Collaborator

mystor commented Sep 27, 2021

    "linker-flavor": "ld.lld",
    "linker": "rust-lld",
    "post-link-args": {
        "ld.lld": [
            "-z nostart-stop-gc"
        ]
    },

Wouldn't you need to write it more like:

"ld.lld": ["-z", "nostart-stop-gc"]

because they need to be passed as separate arguments to the linker? Doing that seems to work for me with rust-lld.

@hawkw
Copy link
Owner Author

hawkw commented Sep 27, 2021

    "linker-flavor": "ld.lld",
    "linker": "rust-lld",
    "post-link-args": {
        "ld.lld": [
            "-z nostart-stop-gc"
        ]
    },

Wouldn't you need to write it more like:

"ld.lld": ["-z", "nostart-stop-gc"]

because they need to be passed as separate arguments to the linker? Doing that seems to work for me with rust-lld.

ahahahaha cool i'm a dumbass, thanks. nice catch!

@hawkw hawkw changed the title re-bump nightly chore: update nightly to 2021-09-22 Sep 27, 2021
@hawkw hawkw merged commit 057bfa1 into main Sep 27, 2021
@hawkw hawkw deleted the eliza/rebump-nightly branch September 27, 2021 19:01
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.

2 participants