Skip to content

Commit

Permalink
Inform user when wsl2 interop causes build issues (jart#952)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattx433 authored and G4Vi committed Jan 19, 2024
1 parent 352e1eb commit 747333a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ MODE := $(m)
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_S = $(shell uname -s)

Expand Down

0 comments on commit 747333a

Please sign in to comment.