Skip to content

Commit

Permalink
Tools build with nlvm docker completely now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacqueswww committed Aug 20, 2019
1 parent 74cf8c2 commit 61ce330
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
9 changes: 9 additions & 0 deletions .gitmodules
@@ -0,0 +1,9 @@
[submodule "vendors/stint"]
path = vendors/stint
url = https://github.com/status-im/nim-stint.git
[submodule "vendors/nimcrypto"]
path = vendors/nimcrypto
url = https://github.com/cheatfate/nimcrypto.git
[submodule "vendors/nim-stew"]
path = vendors/nim-stew
url = https://github.com/status-im/nim-stew.git
28 changes: 16 additions & 12 deletions Makefile
@@ -1,12 +1,7 @@

NLVM=./tools/nlvm
# NLVM=nim


.PHONY: get-nlvm examples
get-nlvm-appimage:
curl -L https://github.com/arnetheduck/nlvm/releases/download/continuous/nlvm-x86_64.AppImage -o tools/nlvm
chmod +x tools/nlvm
pwd=$(shell pwd)
NLVM_PATH_PARAMS=-p:/code/vendors/nimcrypto -p:/code/vendors/stint -p:/code/vendors/nim-stew/
DOCKER_NLVM=docker run -w /code/ -v $(pwd):/code/ jacqueswww/nlvm
DOCKER_NLVM_C=$(DOCKER_NLVM) $(NLVM_PATH_PARAMS) c

.PHONY: get-nlvm-docker
get-nlvm-docker:
Expand All @@ -19,13 +14,22 @@ get-wabt:

.PHONY: tools
tools:
nim c -d:release --out:tools/abi_gen tools/abi_gen.nim
nim c -d:release --out:tools/k256_sig tools/k256_sig.nim
$(DOCKER_NLVM_C) -d:release --out:tools/k256_sig tools/k256_sig.nim
$(DOCKER_NLVM_C) -d:release --out:tools/abi_gen tools/abi_gen.nim

.PHONY: clean
clean:
rm -f *.wasm *.ll *.wat

.PHONY: get-nlvm examples
get-nlvm-appimage:
curl -L https://github.com/arnetheduck/nlvm/releases/download/continuous/nlvm-x86_64.AppImage -o tools/nlvm
chmod +x tools/nlvm

.PHONY: vendors
vendors:
cd vendors
git submodule update

examples:
examples:
@$(MAKE) -C examples
Binary file modified tools/k256_sig
Binary file not shown.
1 change: 1 addition & 0 deletions vendors/nim-stew
Submodule nim-stew added at 43bbe4
1 change: 1 addition & 0 deletions vendors/nimcrypto
Submodule nimcrypto added at e41d68
1 change: 1 addition & 0 deletions vendors/stint
Submodule stint added at d01629

0 comments on commit 61ce330

Please sign in to comment.