[cfe-dev] shell-preserves-root is (*almost) always true...kill it?
Reid Kleckner
rnk at google.com
Wed Jul 15 15:03:48 PDT 2015
Another approach for 'env' would be to handle it internally in lit like we
do for 'cd'. It is already in the business of setting up then environment
before running any command.
On Wed, Jul 15, 2015 at 1:48 PM, Yaron Keren <yaron.keren at gmail.com> wrote:
> OK, done finally in r242329.
> With MSYS bash, one test still fails due to the / expansion and two other
> tests fail because MSYS env does not pass TZ= to the executed program, see
> discussion at
>
> https://github.com/Alexpux/MSYS2-packages/issues/294.
>
> Hopefully MSYS developers will provide a workaorund this or we'll disable
> the tests for MSYS.
>
> Yet another option for LLVM development with MSYS2 is to use a bare-bones
> env.cpp I wrote, good enough to pass LLVM tests but of course not a real
> replacement for env:
>
> #include <process.h>
> #include <stdlib.h>
> #include <string.h>
>
> int main(int argc, char *argv[]) {
> for (unsigned i = 1; i < argc; ++i) {
> if (!strchr(argv[i], '='))
> _execvp(argv[i], argv + i);
> _putenv(argv[i]);
> }
> }
>
>
>
> 2015-07-15 18:13 GMT+03:00 NAKAMURA Takumi <geek4civic at gmail.com>:
>
>> It has been not maintained since r179283. and I haven't build mingw tree
>> with autoconf. I don't object to drop shell-preservers-root.
>
>
> On Wed, Jul 15, 2015 at 11:20 PM Yaron Keren <yaron.keren at gmail.com>
> wrote:
>
>> Since r179283, internal shell is default on windows
>> (*unless use_lit_shell = 0), so execute_external = not windows and
>>
>> # Exclude MSYS due to transforming '/' to 'X:/mingwroot/'.
>> if not platform.system() in ['Windows'] or not execute_external:
>> config.available_features.add('shell-preserves-root')
>>
>> is really "if not windows or (not not windows)" = "if true" making
>> shell-preserves-root always true on Windows (unless use_lit_shell = 0).
>>
>> No tests that require shell-preserves-root are actually disabled now on
>> WIndows + MSYS2. In this configuration, just one test fails (which really
>> require shell-preserves-root): darwin-sdkroot.c. This test has no purpose
>> on windows anyhow and may be disabled. All other tests
>> with shell-preserves-root do pass on MSYS2 bash.
>>
>> Does shell-preserves-root serves any purpose now?
>> Any reason to keep it alive?
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150715/c019bd39/attachment.html>
More information about the cfe-dev
mailing list