[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-16 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb31199bab486: [AVR][clang] Improve search for avr-libc installation path (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-12 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. The file/directory structure in basic_avr_tree_2/opt/local is the same as mhjacobson's machine. Here's what my directory tree looks like. My gcc install consists of: /opt/local/bin/avr-gcc-10.3.0 /opt/local/lib/gcc/avr/10.3.0/libgcc.a

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-12 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D107682#2936040 , @MaskRay wrote: > Seems a new RUN line is needed. If having too many mock trees are > inconvenient, consider `clang/unittests/Driver/ToolChainTest.cpp` I am not familiar with the way in

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-12 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 365996. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/Inputs/basic_avr_tree_2/opt/local/avr/include/.keep

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Seems a new RUN line is needed. If having too many mock trees are inconvenient, consider `clang/unittests/Driver/ToolChainTest.cpp` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. @MaskRay I have update my patch based on your new test avr-toolchain.c. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 365347. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index:

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Matt Jacobson via Phabricator via cfe-commits
mhjacobson added a comment. In D107682#2932685 , @benshi001 wrote: > In D107682#2932607 , @mhjacobson > wrote: > >> For other examples of using four `..`s, look in `Gnu.cpp`, where there are >> several places

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-09 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 365089. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index: clang/test/Driver/avr-toolchain.c

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/avr-toolchain.c:1 // A basic clang -cc1 command-line. MaskRay wrote: > You can UNSUPPORT windows if you don't want to wrestle with \ and / path > separators. UNSUPPORTED: system-windows CHANGES

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:460 + if (llvm::sys::fs::is_directory(Path)) +return Optional(Path); + Path = GCCParent + "/../avr"; `return Path;` Comment at:

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 364955. benshi001 edited the summary of this revision. Herald added a subscriber: ormris. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. In D107682#2932607 , @mhjacobson wrote: > For other examples of using four `..`s, look in `Gnu.cpp`, where there are > several places where `getParentLibPath()` is appended with `/../`. > `AddMultilibPaths()`,

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 364954. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index: clang/test/Driver/avr-toolchain.c

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Matt Jacobson via Phabricator via cfe-commits
mhjacobson added a comment. For other examples of using four `..`s, look in `Gnu.cpp`, where there are several places where `getParentLibPath()` is appended with `/../`. `AddMultilibPaths()`, `PushPPaths()`. `getParentLibPath()`, in turn, is `GCCInstallPath/../../../` CHANGES SINCE LAST

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Matt Jacobson via Phabricator via cfe-commits
mhjacobson added a comment. In D107682#2932599 , @benshi001 wrote: > @mhjacobson Could you please check if my modification also works as expected > on your platform ? Hm... it doesn't, because there aren't enough `..`s. Here's what my directory tree

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. @mhjacobson Could you please check if my modification also works as expected on your platform ? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 ___ cfe-commits mailing

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 marked an inline comment as done. benshi001 added a comment. Thanks. I have added some comments about our agreed logic, as discussed in https://reviews.llvm.org/D107672. I think this way is clear enough. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 364940. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107682/new/ https://reviews.llvm.org/D107682 Files: clang/lib/Driver/ToolChains/AVR.cpp clang/test/Driver/avr-toolchain.c Index: clang/test/Driver/avr-toolchain.c

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Matt Jacobson via Phabricator via cfe-commits
mhjacobson added inline comments. Comment at: clang/lib/Driver/ToolChains/AVR.cpp:457 + std::string GCCRoot(GCCInstallation.getInstallPath()); + std::string Path(GCCRoot + "/../../../avr"); + if (llvm::sys::fs::is_directory(Path)) Would it be worth

[PATCH] D107682: [AVR][clang] Improve search for avr-libc installation path

2021-08-07 Thread Ben Shi via Phabricator via cfe-commits
benshi001 updated this revision to Diff 364938. benshi001 retitled this revision from "[AVR][clang] Search avr-libc installtion path according to avr-gcc's" to "[AVR][clang] Improve search for avr-libc installation path". benshi001 edited the summary of this revision. CHANGES SINCE LAST ACTION