mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-23 22:49:00 +00:00
Inform user when wsl2 interop causes build issues (#952)
This commit is contained in:
parent
25a892d6ae
commit
5d5b282d12
1 changed files with 8 additions and 0 deletions
8
Makefile
8
Makefile
|
@ -73,6 +73,14 @@ MODE := $(m)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# detect wsl2 running cosmopolitan binaries on the host by checking whether:
|
||||||
|
# - user ran build/bootstrap/make.com, in which case make's working directory is in wsl
|
||||||
|
# - user ran make, in which case cocmd.com's working directory is in wsl
|
||||||
|
ifneq ($(findstring //wsl.localhost/,$(CURDIR) $(shell pwd)),)
|
||||||
|
$(warning wsl2 interop is enabled)
|
||||||
|
$(error you need to run sudo sh -c 'echo -1 > /proc/sys/fs/binfmt_misc/WSLInterop')
|
||||||
|
endif
|
||||||
|
|
||||||
UNAME_M = $(shell uname -m)
|
UNAME_M = $(shell uname -m)
|
||||||
UNAME_S = $(shell uname -s)
|
UNAME_S = $(shell uname -s)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue