[PATCH] D131225: Driver: Refactor and support per target dirs in baremetal

Manoj Gupta via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 4 17:59:43 PDT 2022


manojgupta created this revision.
manojgupta added reviewers: MaskRay, abidh, kristof.beyls.
Herald added subscribers: luke957, StephenFan, s.egerton, simoncook, ki.stfu.
Herald added a project: All.
manojgupta requested review of this revision.
Herald added subscribers: cfe-commits, pcwang-thead.
Herald added a project: clang.

Refactor baremetal driver code to reduce the bespoke
additions and base class overrides.
This lets us use the per target runtimes like other clang
targets. E.g. clang -target armv7m-cros-none-eabi will now
be able to use the runtimes installed at
<resource_dir>/lib/armv7m-cros-none-eabi instead of the hardcoded
path <resource_dir>/lib/baremetal.
The older code paths should still continue to work as before if
<resource_dir>/lib/<tuple> does not exist.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131225

Files:
  clang/include/clang/Driver/ToolChain.h
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChain.cpp
  clang/lib/Driver/ToolChains/BareMetal.cpp
  clang/lib/Driver/ToolChains/BareMetal.h
  clang/test/Driver/Inputs/resource_dir_with_per_target_subdir/lib/armv7m-vendor-none-eabi/libclang_rt.builtins.a
  clang/test/Driver/baremetal.cpp
  clang/test/Driver/print-libgcc-file-name-clangrt.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131225.450198.patch
Type: text/x-patch
Size: 13339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220805/7490b2fa/attachment.bin>


More information about the cfe-commits mailing list