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

fix clang-tools #18270

Merged
merged 1 commit into from
Oct 16, 2023
Merged

fix clang-tools #18270

merged 1 commit into from
Oct 16, 2023

Conversation

landfillbaby
Copy link
Member

@landfillbaby landfillbaby commented Oct 15, 2023

the llvm codebase is confusing but i think this fixes #18240 which was caused by #18074. needs testing when ci is done.

@landfillbaby
Copy link
Member Author

ok this way works but i just thought of a better one i think. https://github.com/llvm/llvm-project/blob/llvmorg-17.0.2/llvm/lib/Support/Unix/Path.inc#L320

@landfillbaby landfillbaby force-pushed the clang-tools-fix branch 3 times, most recently from 17b5e00 to 7797ef6 Compare October 16, 2023 05:57
@landfillbaby
Copy link
Member Author

landfillbaby commented Oct 16, 2023

ok, i think this is closer to the way it would have worked with proc/self/exe without having to patch everything that calls it indirectly. because they haven't actually bothered to test it on non-linux oses. in a lot of cases it's always given both a bad argv0 and a bad MainAddr...
getprogname (api 21) isn't broken by being run as an argument to /system/bin/linker64 on android 14. the dladdr way would have worked if they gave it a good address every time

@landfillbaby
Copy link
Member Author

wait i can do even better! brb parsing /proc/self/cmdline

@landfillbaby landfillbaby force-pushed the clang-tools-fix branch 2 times, most recently from 2aa421c to c3bdd49 Compare October 16, 2023 10:37
@landfillbaby
Copy link
Member Author

landfillbaby commented Oct 16, 2023

does anyone have any objections to merging this? it should work perfectly now in both the case of relative or PATH executables and absolute ones via /system/bin/linker[64] :)

@landfillbaby
Copy link
Member Author

landfillbaby commented Oct 16, 2023

i guess this will be how we fix all of the programs that need their own absolute path :) maybe move it to libandroid-support?

@landfillbaby landfillbaby changed the title fix clang-tools (hopefully) fix clang-tools Oct 16, 2023
@landfillbaby landfillbaby merged commit a658027 into master Oct 16, 2023
@landfillbaby landfillbaby deleted the clang-tools-fix branch October 16, 2023 17:43
TomJo2000 pushed a commit to TomJo2000/termux-packages-prs that referenced this pull request Nov 12, 2023
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.

[Bug]: Clang-tidy dosent find headers properly
1 participant