Skip to content

windows: overriding cache dirs with build-exe failing #9215

@jonforums

Description

@jonforums

On Win10 x64 while trying to host the cache dirs in a ramdisk I'm getting the following:

# purged default global cache dir
PS $ ll C:\Users\Jon\AppData\Local\zig\

## build fails
PS $ C:\Apps\zig\zig.exe build-exe --single-threaded -target native --global-cache-dir R:/global-cache --cache-dir R:/cache -O ReleaseSmall .\lke.zig
error(mingw): unable to turn kernel32.def into kernel32.lib
error(mingw): unable to turn ntdll.def into ntdll.lib
error: unable to build compiler_rt: UnableToWriteArchive
error: unable to build libssp: UnableToWriteArchive
error: unable to build zig's multitarget libc: UnableToWriteArchive
error: unable to generate DLL import .lib file: WritingImportLibFailed

## local and global build caches on R:/ ramdisk
PS $ ll R:\cache\,R:\global-cache\

    Directory: R:\cache

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           6/23/2021  3:25 PM                h
d----           6/23/2021  3:25 PM                o
d----           6/23/2021  3:25 PM                z

    Directory: R:\global-cache

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           6/23/2021  3:25 PM                h
d----           6/23/2021  3:25 PM                o
d----           6/23/2021  3:25 PM                z

## my zig env
PS $ C:\Apps\zig\zig.exe env
{
 "zig_exe": "C:\\Apps\\zig\\zig.exe",
 "lib_dir": "C:\\Apps\\zig\\lib\\zig",
 "std_dir": "C:\\Apps\\zig\\lib\\zig\\std",
 "global_cache_dir": "C:\\Users\\Jon\\AppData\\Local\\zig",
 "version": "0.9.0-dev.256+0134cb021"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavioros-windowsMicrosoft Windows

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions