Since ToolChain::GetCXXStdlibType() is a simple getter that might emit the "invalid library name in argument" warning, it can conceivably be called several times while initializing the build pipeline.
Before this patch, a simlpe 'clang++ -stdlib=foo ./test.cpp' would print the warning twice.
Change this and always only print the warning once. Keep the rest of the semantics of the function.
E.g, before:
$ clang++ -stdlib=foo ./test.cpp clang-10: error: invalid library name in argument '-stdlib=foo' clang-10: error: invalid library name in argument '-stdlib=foo'
After:
$ bin/clang++ -stdlib=foo ./test.cpp clang-12: error: invalid library name in argument '-stdlib=foo'