compiler-rt used to print /path/to/lib/clang/version/lib/libclang_rt.builtins-arm.a but should print /path/to/lib/clang/version/lib/baremetal/libclang_rt.builtins-arm.a.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/include/clang/Driver/ToolChain.h | ||
|---|---|---|
| 662–664 | I think with some overrides in Baremetal driver, this should hopefully not be needed. | |
| clang/lib/Driver/ToolChain.cpp | ||
| 401 ↗ | (On Diff #297890) | Can you implement this function in BareMetal toolchain driver. My understanding is this is already a virtual function so implementing it there is better to override the default location. |
| clang/lib/Driver/ToolChains/BareMetal.cpp | ||
| 40 | Please add function Stringref getOSLibName() to override the default. It should return "baremetal" | |
| 67 | Please add a getCompilerRTPath function which will call BareMetal::getRuntimesDir and to override ToolChain's getCompilerRTPath behavior. | |
| 163 | Please implement getCompilerRTBasename function that just returns the part "clang_rt.builtins-" + getTriple().getArchName())" and call it here. getCompilerRTBasename may need to be made virtual in Toolchain class so that it will override ToolChain class's default implementation. | |
| clang/lib/Driver/ToolChains/BareMetal.cpp | ||
|---|---|---|
| 163 | Actually instead of implementing getCompilerRTBasename , just adding getArchNameForCompilerRTLib function is probably enough. Make getArchNameForCompilerRTLib function in Toolchain.cpp part of Toolchain class and make it virtual. Then overriding getArchNameForCompilerRTLib in BareMetal.h/.cpp by "return getTriple().getArchName()" is just what we need. | |
Applies @manojgupta's requests.
| clang/lib/Driver/ToolChains/BareMetal.cpp | ||
|---|---|---|
| 163 | Done, needed to prepend "lib" as well. | |
| clang/lib/Driver/ToolChains/BareMetal.cpp | ||
|---|---|---|
| 163 | Thanks, overriding getArchNameForCompilerRTLib probably makes the change too large. We can revisit this in future if needed. | |
I think with some overrides in Baremetal driver, this should hopefully not be needed.