Metal Developer Tools on Windows Companion File issue

Hey there,

We're working on a shader pipeline on windows and are making use of the metal developer tools on windows.
We're trying to generate a companion file based on this guide here: https://developer.apple.com/documentation/metal/libraries/generating_and_loading_a_metal_library_symbol_file

Currently running the following commands on windows produces an error, while the exact same counterpart on macos using xcrun end up working.

metal.exe -std=ios-metal2.1 -mios-version-min=11.0 -c -frecord-sources -o test.air test.metal
metal.exe -std=ios-metal2.1 -mios-version-min=11.0 -frecord-sources -o test.metallib test.air
metal-dsymutil.exe --flat --remove-source test.metallib

the last command produces the following error

warning: 'test.metallib' architecture air64_v21 does not support a companion MetalLib; copying verbatim

error: cannot write 'test.metallib': The system cannot move the file to a different disk drive.

We think there may be an issue with metal-dsymutil failing to move a temporary file onto a different file system. We are now tracking this issue.

As a workaround, can you try to compile to the same disk that %TEMP% is on and please let us know if that works?

Try using -MO instead of -frecord-sources. That's the only way things worked on Mac, even though this flag is deprecated.

Metal Developer Tools on Windows Companion File issue
 
 
Q