This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Don't add dirs from the LIB env var to PATH
ClosedPublic

Authored by mstorsjo on Mar 24 2021, 12:47 AM.

Details

Summary

The directories in LIB normally only contain import libraries or
static libraries, no runtime DLLs that would need to be found
while running tests.

This code stems from 1cd196e7b46e49d170a4b4013879a577dee59cb2,
which (among other things) tried to do this:

  • [Test] Fix handling of library runtime search paths by correctly adding them to the PATH variable when running the tests.

It's unclear to me exactly what this fixed (or tried to) at the time,
as the LIB var doesn't normally point to runtime libs.

Diff Detail

Event Timeline

mstorsjo created this revision.Mar 24 2021, 12:47 AM
mstorsjo requested review of this revision.Mar 24 2021, 12:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 12:47 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript

CC @amccarth

Adding some more windows knowledgeable people to weigh in on whether one would need to add entries from LIB to PATH.

Adding everything in LIB to PATH is not a normal thing to do in Windows, so I would support this patch to remove that hack. If we knew what the original problem was, we could probably find a better solution.

When you run the tests, does anything differ with and without this patch?

Adding everything in LIB to PATH is not a normal thing to do in Windows, so I would support this patch to remove that hack. If we knew what the original problem was, we could probably find a better solution.

When you run the tests, does anything differ with and without this patch?

Nothing differs when it comes to actually executing/passing tests. The only visible difference is that the executor scripts are passed fewer paths via the --env option.

So my guess is that it was an attempt at fixing something, done at the same time as a number of other changes, without verifying that this particular change actually had any effect.

amccarth accepted this revision.Mar 30 2021, 8:49 AM

LGTM.

ldionne accepted this revision as: Restricted Project.Mar 30 2021, 3:38 PM
ldionne added a subscriber: ldionne.

FWIW, if this moves us towards fixing things on Windows and it's a thing in Windows that adding everything in LIB to the path isn't normal, then I say we ship this. I'm not Windows-literate at all though, so I can't speak to that directly myself.

This revision is now accepted and ready to land.Mar 30 2021, 3:38 PM