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

Backport commit 35f0f9a to 0.70.x series (clang_getFileLocation instead of clang_getSpellingLocation) #2948

Closed
yonas opened this issue Oct 9, 2024 · 6 comments

Comments

@yonas
Copy link

yonas commented Oct 9, 2024

Backport this fix 35f0f9a into the 0.70.x series.

On FreeBSD, https://www.freshports.org/devel/rust-bindgen-cli will pick it up as a new release.

Fixes: aws/aws-lc-rs#476

@emilio
Copy link
Contributor

emilio commented Oct 9, 2024

But it's already in 0.70.1 right? Or what am I missing?

@pvdrz
Copy link
Contributor

pvdrz commented Oct 9, 2024

But it's already in 0.70.1 right? Or what am I missing?

Yes this change was published first on 0.70.0.

I find this request intriguing as 0.69.5 was released exclusively to address the issue that aws-lc-rs couldn't use bindgen 0.70.0 and further due to their MSRV and they needed this change.

@yonas
Copy link
Author

yonas commented Oct 9, 2024

I don't see the commit in:

v0.70.0...main
v0.70.1...main

@emilio
Copy link
Contributor

emilio commented Oct 9, 2024

Correct, because it's in v0.69.4...v0.70.0

I think this doesn't need any change on our end unless I'm missing something.

@emilio emilio closed this as completed Oct 9, 2024
@emilio
Copy link
Contributor

emilio commented Oct 9, 2024

(Please reopen if that's the case!)

@pvdrz
Copy link
Contributor

pvdrz commented Oct 9, 2024

I think part of the confusion might have to do with the fact that git doesn't use the same hash for the cherry-picked commit that appears on 0.69.5 (35f0f9a) and the one that's on the default tree (600f638):

$ git show --no-patch 35f0f9a
commit 35f0f9aafc9b25c3bf05cc49d9c23515e0c53141 (origin/llvm-19-fix, llvm-19-fix)
Author: Mike Hommey <[email protected]>
Date:   Tue Apr 30 05:40:58 2024 +0900

    Use clang_getFileLocation instead of clang_getSpellingLocation

    Both had the same behavior... until https://github.com/llvm/llvm-project/commit/2e770edd8ce13f48402f1d93e5fb982d8a2ebe64
    which fixed getSpellingLocation, but bindgen looks like it actually expects
    the getFileLocation result.
$ git tag --contains 35f0f9a
v0.69.5
$ git show --no-patch 600f638
commit 600f63895f73c80d6bf7ff3c71b86a068d1663d2
Author: Mike Hommey <[email protected]>
Date:   Tue Apr 30 05:40:58 2024 +0900

    Use clang_getFileLocation instead of clang_getSpellingLocation

    Both had the same behavior... until https://github.com/llvm/llvm-project/commit/2e770edd8ce13f48402f1d93e5fb982d8a2ebe64
    which fixed getSpellingLocation, but bindgen looks like it actually expects
    the getFileLocation result.
$ git tag --contains 600f638
v0.70.0
v0.70.1

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

No branches or pull requests

3 participants