diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2022-10-05 08:41:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-05 07:41:09 +0200 |
commit | c49fca9af83d5744525077719aab529e821f8c02 (patch) | |
tree | 568b8d336fbc25e67cc6f647fd9b7f179a84358f | |
parent | b12af302861287e16d3a7a91ad2d14c1657342bc (diff) | |
download | ccache-c49fca9af83d5744525077719aab529e821f8c02.tar.gz |
fix: Capture MSVC stdout/stderr when running from Visual Studio (#1170)
-rw-r--r-- | src/ccache.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ccache.cpp b/src/ccache.cpp index b065f829..7884a009 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -2266,6 +2266,12 @@ do_cache_compilation(Context& ctx, const char* const* argv) TRY(set_up_uncached_err()); + // VS_UNICODE_OUTPUT prevents capturing stdout/stderr, as the output is sent + // directly to Visual Studio. + if (ctx.config.compiler_type() == CompilerType::msvc) { + Util::unsetenv("VS_UNICODE_OUTPUT"); + } + for (const auto& name : {"DEPENDENCIES_OUTPUT", "SUNPRO_DEPENDENCIES"}) { if (getenv(name)) { LOG("Unsupported environment variable: {}", name); |