[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2021-05-07 Thread Hafiz Abid Qadeer via Phabricator via cfe-commits
abidh added a comment. If gcc and clang based toolchains are installed in the same prefix then having sysroot at same location can cause one installation to overwrite parts of other. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92677/new/

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2021-05-06 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:102 + SmallString<128> SysRootDir; + llvm::sys::path::append(SysRootDir, getDriver().Dir, "../lib/clang-runtimes", + getDriver().getTargetTriple()); I

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-07 Thread Hafiz Abid Qadeer via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG275592e71413: Provide default location of sysroot for Baremetal toolchain. (authored by abidh). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92677/new/

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:108 + + return std::string(SysRootDir.str()); +} abidh wrote: > jroelofs wrote: > > Small string has an implicit conversion to std::string, so you can just > > `return

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:105 + + return std::string(SysRootDir); +} did `return SysRootDir;` not work? Why do you need the explicit std::string ctor call? CHANGES SINCE LAST ACTION

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Hafiz Abid Qadeer via Phabricator via cfe-commits
abidh marked an inline comment as done. abidh added inline comments. Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:108 + + return std::string(SysRootDir.str()); +} jroelofs wrote: > Small string has an implicit conversion to std::string, so you can just

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Hafiz Abid Qadeer via Phabricator via cfe-commits
abidh updated this revision to Diff 309637. abidh added a comment. Handled review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92677/new/ https://reviews.llvm.org/D92677 Files: clang/lib/Driver/ToolChains/BareMetal.cpp clang/lib/Driver/ToolChains/BareMetal.h

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:105 + + if (!llvm::sys::fs::exists(SysRootDir)) +return std::string(); Why not always

[PATCH] D92677: Provide default location of sysroot for Baremetal toolchain.

2020-12-04 Thread Hafiz Abid Qadeer via Phabricator via cfe-commits
abidh created this revision. abidh added reviewers: mcarrasco, jroelofs. abidh added a project: clang. Herald added subscribers: s.egerton, PkmX, simoncook, kristof.beyls. abidh requested review of this revision. Herald added a subscriber: cfe-commits. Currently, Baremetal toolchain requires user