Skip to content

sccache + MSVC: output dir specification doesn't work as expected #2532

@AJIOB

Description

@AJIOB

It can be reproduced in the developer command prompt:

D:\tmp>cl /c foo.cpp "/Fo.\\"
Microsoft (R) C/C++ Optimizing Compiler Version 19.44.35222 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

foo.cpp

D:\tmp>sccache cl /c foo.cpp "/Fo.\\"
sccache: encountered fatal error
sccache: error: failed to zip up compiler outputs
sccache: caused by: failed to zip up compiler outputs
sccache: caused by: failed to open file `"D:\\tmp\\.\\"`
sccache: caused by: failed to open file `D:\tmp\.\`
sccache: caused by: The system cannot find the path specified. (os error 3)

D:\tmp>type foo.cpp
void foo() {}

In real life, the . in /Fo.\\ is used as some relative directory name.

As we can see in docs, we can pass the object file or the object folder

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions