[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-27 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: >edit: hopefully good after >https://github.com/llvm/llvm-project/commit/5aa3338930d15a59dd6ddbd36fc09ffa6610ca72 the test has been passed locally on the builder with this commit. Thank you for the fix. https://github.com/llvm/llvm-project/pull/66947

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-27 Thread Anton Korobeynikov via cfe-commits
asl wrote: @sam-mccall As far as I can see, the bot was green before this change: https://lab.llvm.org/buildbot/#/builders/119/builds/15229 Have you not received email from the buildbot? https://github.com/llvm/llvm-project/pull/66947 ___

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-27 Thread Sam McCall via cfe-commits
sam-mccall wrote: ... and as soon as I said that, I found something: looks like these are maybe building with `DEFAULT_SYSROOT=C:/buildbot/.arm-ubuntu`, which breaks the no-sysroot behavior we're testing here. I'll see if I can override with `--sysroot=`

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-27 Thread Sam McCall via cfe-commits
sam-mccall wrote: Sorry, there were no notifications, I guess the bot was already red. I'm not really sure what to do other than disable the test on these bots - I don't know why it would fail on win/arm (it seems to pass on win/x86), and I don't have access to such a machine. This behavior

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-25 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: @sam-mccall , your 7ca8c21af36acb117529e797b3d36e85a286ca47 commit breaks `Clang-Unit :: Driver/./ClangDriverTests.exe/ToolChainTest/VFSGnuLibcxxPathNoSysroot` (`Clang-Unit::67`) test on the windows toolchain builders *

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall closed https://github.com/llvm/llvm-project/pull/66947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Shoaib Meenai via cfe-commits
@@ -316,6 +318,52 @@ TEST(ToolChainTest, VFSSolarisMultiGCCInstallation) { } } +MATCHER_P(jobHasArgs, Substr, "") { + const driver::Command = arg; + std::string Args = ""; + llvm::ListSeparator Sep(" "); + for (const char *Arg : C.getArguments()) { +Args += Sep; +

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai resolved https://github.com/llvm/llvm-project/pull/66947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Sam McCall via cfe-commits
@@ -316,6 +318,52 @@ TEST(ToolChainTest, VFSSolarisMultiGCCInstallation) { } } +MATCHER_P(jobHasArgs, Substr, "") { + const driver::Command = arg; + std::string Args = ""; + llvm::ListSeparator Sep(" "); + for (const char *Arg : C.getArguments()) { +Args += Sep; +

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai approved this pull request. https://github.com/llvm/llvm-project/pull/66947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Shoaib Meenai via cfe-commits
smeenai wrote: LGTM, thanks! https://github.com/llvm/llvm-project/pull/66947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Shoaib Meenai via cfe-commits
@@ -316,6 +318,52 @@ TEST(ToolChainTest, VFSSolarisMultiGCCInstallation) { } } +MATCHER_P(jobHasArgs, Substr, "") { + const driver::Command = arg; + std::string Args = ""; + llvm::ListSeparator Sep(" "); + for (const char *Arg : C.getArguments()) { +Args += Sep; +

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/66947 >From 00ef242c40dd453157ee3b31e367fd6240d68a5a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 20 Sep 2023 21:19:03 +0200 Subject: [PATCH 1/3] [Driver] Fix detection of libc++ with empty sysroot.

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Sam McCall via cfe-commits
sam-mccall wrote: > I just meant to change [...] It's a local fix, but all the code here is > pretty inconsistent anyway, so I don't feel too bad about it. Oops, of course. Done & I worked out the testing. https://github.com/llvm/llvm-project/pull/66947

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-22 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall updated https://github.com/llvm/llvm-project/pull/66947 >From 00ef242c40dd453157ee3b31e367fd6240d68a5a Mon Sep 17 00:00:00 2001 From: Sam McCall Date: Wed, 20 Sep 2023 21:19:03 +0200 Subject: [PATCH 1/2] [Driver] Fix detection of libc++ with empty sysroot.

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Shoaib Meenai via cfe-commits
smeenai wrote: > Thanks for the quick response! > > > The `sys::path::append` behavior here is surprising. I think it'd be better > > to change the computation of `SysRoot` in the function above (line 3102, > > which I can't comment because of GitHub, sigh) to default to > >

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Sam McCall via cfe-commits
sam-mccall wrote: Thanks for the quick response! > The `sys::path::append` behavior here is surprising. I think it'd be better > to change the computation of `SysRoot` in the function above (line 3102, > which I can't comment because of GitHub, sigh) to default to >

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Shoaib Meenai via cfe-commits
smeenai wrote: Sorry about the breakage. The `sys::path::append` behavior here is surprising. I think it'd be better to change the computation of `SysRoot` in the function above (line 3102, which I can't comment because of GitHub, sigh) to default to `llvm::sys::path::get_separator()` if

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Changes b1e3cd1d79443603dc003441e07cdd8d30bb7f26 dropped the leading slash here, presumably unintentionally. (I don't understand Driver well enough to know how/where this is supposed to be tested, but it broke clangd on any project that

[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-20 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall created https://github.com/llvm/llvm-project/pull/66947 b1e3cd1d79443603dc003441e07cdd8d30bb7f26 dropped the leading slash here, presumably unintentionally. (I don't understand Driver well enough to know how/where this is supposed to be tested, but it broke clangd