From 0409839729fb4348764905a7e8c2bb53000087a3 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 18 Mar 2024 13:55:57 -0700 Subject: [PATCH] Dump a `VERSION` file in the build directory As noted in #372, some users may need to identify which version of wasi-sdk they are using after it has been downloaded. There are many ways to solve this, but the one I chose here is to dump the wasi-sdk version into a `VERSION` file and follow that up with several dependency versions that may be helpful to note when troubleshooting. Ideally someone could paste the contents of that file when filing a bug. If we adopt this approach, this fixes #372. --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cf3ccb17c..9c7acffbf 100644 --- a/Makefile +++ b/Makefile @@ -256,7 +256,11 @@ build/config.BUILT: cp cmake/Platform/WASI.cmake $(BUILD_PREFIX)/share/cmake/Platform touch build/config.BUILT -build: build/llvm.BUILT build/wasi-libc.BUILT build/compiler-rt.BUILT build/libcxx.BUILT build/config.BUILT +build/version.BUILT: + $(VERSION_SCRIPT) dump > $(BUILD_PREFIX)/VERSION + touch build/version.BUILT + +build: build/llvm.BUILT build/wasi-libc.BUILT build/compiler-rt.BUILT build/libcxx.BUILT build/config.BUILT build/version.BUILT strip: build/llvm.BUILT ./strip_symbols.sh $(BUILD_PREFIX)/bin