-
-
Notifications
You must be signed in to change notification settings - Fork 865
Description
Is your feature request related to a problem? Please describe.
Previously, a workflow was created to build xmake with cosmocc
https://github.com/xmake-io/xmake/blob/b657911e2b0c34674570368c73c5025eff9d7649/.github/workflows/cosmocc.yml
However, this was not successful as it didn't run, but I noticed that this build was made using macos, so I tried to build it on linux.
First, I just tested that a normal xmake build (without embed) would work
a2va:~/xmake/core$ xmake f -p linux --cosmocc=y
The executable runs fine, then I enabled embed
a2va:~/xmake/core$ xmake f -p linux --cosmocc=y
Again, no problem with the executable, then I copied the file to Windows (the build was done in WSL Ubuntu). And it starts, but with this error:
PS D:\\xm-tt> .\\xmake-tt.exe --version
Error: @programdir/core/base/task.lua:398: @programdir/core/base/winos.lua:238: Field '_registry_query' is not accessible (a null value)
Stack traceback:
[@programdir/core/base/winos.lua:238]: in function 'registry_query'.
[@programdir/core/base/cpu.lua:222]: in function '_info'.
[@programdir/core/base/cpu.lua:286]: in function 'Vendor'
[@programdir/core/base/cpu.lua:352]:
[@programdir/core/base/os.lua:1443]: in function 'default_njob'.
[@programdir/plugins/pack/xmake.lua:31]: in main chunk
I suspect this is because Cosmopolitan doesn't implement the Windows API for editing the registry, but those can added if needed (eg: jart/cosmopolitan#1318), or the other solution would be to completely disable this functionality.
Describe the solution you'd like
With this feature the xmake bundle executable which is for now windows only could be extended to other platforms.
Describe alternatives you've considered
No response
Additional context
No response