这是indexloc提供的服务,不要输入任何密码
Skip to content

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 landfillbaby marked this pull request as ready for review October 16, 2023 10:59
@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