How do I pass test runner arguments to individual tests?

On Windows when the test runner is building the test executables, I need to set some environment variables before running make. I wanted to do this by passing in a custom built env to subprocess.Popen() in lldbtest.system. In order to determine the value of these environment variables, I need to rely on the value of a command line argument passed into dotest.py. What is the correct way to propagate this information down into lldbtest?

It’s not enough to just do it once at startup and let child processes inherit the test runner’s environment, because the environment that I need to create is different depending on whether this is x86 tests or x64 tests, so it really needs to happen with each invocation of make.