Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXC.EXE lacks support for long file paths #6667

Open
walbourn opened this issue May 31, 2024 · 4 comments
Open

DXC.EXE lacks support for long file paths #6667

walbourn opened this issue May 31, 2024 · 4 comments
Labels
bug Bug, regression, crash
Milestone

Comments

@walbourn
Copy link
Member

walbourn commented May 31, 2024

When long file paths are enabled on Windows 10 Version 1607 or later, DXC.EXE still fails to compile them.

In general the LLVM codebase supports very long file paths internally, so this is likely just a case of adding the following manifest to the binary.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
    <asmv3:application>
        <asmv3:windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
            <ws2:longPathAware>true</ws2:longPathAware>
        </asmv3:windowsSettings>
    </asmv3:application>
</assembly>

For example:

md "Projects\C++\this is a rather long path for a path on windows where long paths are a problem with the limit of two hundred fifty characters but there is a solution which implies adding a registry key and configuring the project to include a manifest"
// copy PixelShader.hlsl to this new folder
dxc /T ps_6_0 "Projects\C++\this is a rather long path for a path on windows where long paths are a problem with the limit of two hundred fifty characters but there is a solution which implies adding a registry key and configuring the project to include a manifest\PixelShader.hlsl"
The system cannot find the path specified. Projects\C++\this is a rather long path for a path on windows where long paths are a problem with the limit of two hundred fifty characters but there is a solution which implies adding a registry key and configuring the project to include a manifest\PixelShader.hlsl
@walbourn walbourn added bug Bug, regression, crash needs-triage Awaiting triage labels May 31, 2024
@llvm-beanz llvm-beanz added this to the Dormant milestone Jun 10, 2024
@llvm-beanz llvm-beanz removed the needs-triage Awaiting triage label Jun 10, 2024
@llvm-beanz
Copy link
Collaborator

@walbourn We've screened this as dormant and aren't likely to invest resources to fix it but would accept a PR. Can you provide some context for the priority of this issue?

@walbourn
Copy link
Member Author

walbourn commented Jun 11, 2024

We are pushing to get as many developer tools updated for long paths as possible. MSBuild supports long paths. CMake/Ninja support long paths. Since this codebase is LLVM based, it should be long path compatible without significant change.

@llvm-beanz
Copy link
Collaborator

@walbourn, unfortunately I don’t think that is quite true. DXC doesn’t use LLVM’s filesystem abstractions instead it inserted its own which are hand rolled.

@Squall-Leonhart
Copy link

DXC functions with long paths just fine when the manifest is forcibly injected, only tested up to 2000 characters though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug, regression, crash
Projects
Status: Triaged
Development

No branches or pull requests

3 participants