This is an archive of the discontinued LLVM Phabricator instance.

clang: Exherbo multiarch ajustments
Changes PlannedPublic

Authored by Keruspe on Nov 15 2019, 5:50 AM.

Details

Summary

Exherbo multiarch layout being somewhat specific, some adjustments need to be made wrt the lookup paths.

Based in parts on patches by Marvin Schmidt

Diff Detail

Event Timeline

Keruspe created this revision.Nov 15 2019, 5:50 AM
Keruspe updated this revision to Diff 229600.Nov 15 2019, 11:09 AM

Make Exherbo multiarch integration more similar to the debian one

Keruspe updated this revision to Diff 229682.Nov 16 2019, 1:17 AM

Mark some tests as XFAIL on exherbo because the filesystem layout is different

compnerd requested changes to this revision.Nov 18 2019, 2:25 PM

The test adjustments are incorrect. They should optionally accept the triple in the path.

clang/lib/Driver/ToolChains/Linux.cpp
360

Could you use llvm::sys::path::stem please?

889

Why not just always construct the path? "/usr/" + getTriple.str() + "/include" is always going to be the path that we have for exherbo

984

Why is this part of the if? This should be part of the code executed conditionally.

This revision now requires changes to proceed.Nov 18 2019, 2:25 PM
Keruspe planned changes to this revision.Nov 19 2019, 12:11 AM
Keruspe marked 3 inline comments as done.

Will give llvm::sys::path::stem a look and try to drop the x86_64 part from the include dir selection

clang/lib/Driver/ToolChains/Linux.cpp
360

This was just a copy of the code that as already there, with a different path, but I sure can give that a look

889

That's what we had at first, but then e.g. clang -m32 didn't work as it was searching inside of i383 and not i686, and wrt x86_64 it was using unknown at some point instead of pc.
The x86_64 part might have been because it was in another environment but the x86 part definitely is still relevant

984

It just matches the if from below, with the distro check added. Not familiar with the llvm codebase so I'm trying to just stick to the similar code that's just next to it