-
Notifications
You must be signed in to change notification settings - Fork 75
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 --build-id to the linker flags #159
Conversation
I have 2 questions:
|
I haven't tested it myself, but here's a discussion from 2021 which states that Rust by default does not include a build ID: https://internals.rust-lang.org/t/emitting-build-id-when-linking-elf-binaries/15349 |
OK. I'd be happier making this opt-in. @bendk? |
61a6d5d
to
e0a4141
Compare
Sounds good, I just updated the PR to make this optional. One issue I noticed is that there seems to be an issue with stale objects. In order for the change to take effect I needed to run |
### generateBuildId | ||
|
||
Generate a build-id for the shared library during the link phase. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions on how to better describe this? I think a link would be great, but when I did a quick search I didn't find a good page to send people to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also open to changing the config name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a better link either; maybe https://linux.die.net/man/1/ld? I see some options, but that can be for the next person to monkey with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me. Do you know how to cut a release? There are docs in the repo, give it a try?
### generateBuildId | ||
|
||
Generate a build-id for the shared library during the link phase. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a better link either; maybe https://linux.die.net/man/1/ld? I see some options, but that can be for the next person to monkey with.
Sounds good, let's see what happens. |
Upgrade rust-android-gradle and set the `generateBuildId` flag.. See mozilla/rust-android-gradle#159 for details.
Upgrade rust-android-gradle and set the `generateBuildId` flag.. See mozilla/rust-android-gradle#159 for details.
Upgrade rust-android-gradle and set the `generateBuildId` flag. See mozilla/rust-android-gradle#159 for details.
Upgrade rust-android-gradle and set the `generateBuildId` flag. See mozilla/rust-android-gradle#159 for details.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1937916 for the reasoning here. I tested this with a Maven local publish and it worked for me.
This could also be behind an option, either one specifically for
build-id
or a general one likeEXTRA_LINKER_ARGS
. It seems likebuild-id
is a good default though so I didn't implement it that way on the first pass.