diff options
author | Ayke van Laethem <[email protected]> | 2023-10-14 14:03:57 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-10-14 17:32:56 +0200 |
commit | 2d4307647e98f9abf05618b90a3f9658cee29d85 (patch) | |
tree | bf23d5201c5dcff3eba43e7db9ac0f7f2bcdbe03 /GNUmakefile | |
parent | 935a29310694f899601da14bb2d6e316b4f489c3 (diff) | |
download | tinygo-2d4307647e98f9abf05618b90a3f9658cee29d85.tar.gz tinygo-2d4307647e98f9abf05618b90a3f9658cee29d85.zip |
nix: improve docs and add support for wasi-libc
I forgot a few things in the flake file, but now everything should be
included.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 8d36e99a2..7a93a1ef4 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -25,6 +25,11 @@ CLANG ?= $(call findLLVMTool,clang) LLVM_AR ?= $(call findLLVMTool,llvm-ar) LLVM_NM ?= $(call findLLVMTool,llvm-nm) +# Patch up Clang for Nix. +ifneq (, ${CLANG_RESOURCE_DIR}) + CLANG := $(CLANG) -resource-dir ${CLANG_RESOURCE_DIR} +endif + # Go binary and GOROOT to select GO ?= go export GOROOT = $(shell $(GO) env GOROOT) @@ -265,7 +270,7 @@ endif wasi-libc: lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a lib/wasi-libc/sysroot/lib/wasm32-wasi/libc.a: @if [ ! -e lib/wasi-libc/Makefile ]; then echo "Submodules have not been downloaded. Please download them using:\n git submodule update --init"; exit 1; fi - cd lib/wasi-libc && $(MAKE) -j4 EXTRA_CFLAGS="-O2 -g -DNDEBUG -mnontrapping-fptoint -msign-ext" MALLOC_IMPL=none CC=$(CLANG) AR=$(LLVM_AR) NM=$(LLVM_NM) + cd lib/wasi-libc && $(MAKE) -j4 EXTRA_CFLAGS="-O2 -g -DNDEBUG -mnontrapping-fptoint -msign-ext" MALLOC_IMPL=none CC="$(CLANG)" AR=$(LLVM_AR) NM=$(LLVM_NM) # Check for Node.js used during WASM tests. NODEJS_VERSION := $(word 1,$(subst ., ,$(shell node -v | cut -c 2-))) |