[PATCH] D93138: Add initial support for multilibs in Baremetal toolchain.
Zixuan Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 26 20:45:28 PDT 2022
zixuan-wu added inline comments.
Herald added subscribers: pcwang-thead, luke957, StephenFan, MaskRay, arichardson.
Herald added a project: All.
================
Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:177
if (!getDriver().SysRoot.empty())
- return getDriver().SysRoot;
+ return getDriver().SysRoot + SelectedMultilib.osSuffix();
----------------
I think the multilib osSuffix added here will make every multilib contain include dir, and those include dirs are the same. For lib, there should be different multilib dir.
So it's better to add osSuffix at construction function like following I think instead of be part of sysroot.
```
if (!SysRoot.empty()) {
llvm::sys::path::append(SysRoot, "lib", SelectedMultilib.osSuffix());
getFilePaths().push_back(std::string(SysRoot));
}
```
@abidh
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93138/new/
https://reviews.llvm.org/D93138
More information about the cfe-commits
mailing list