From 0c16443fa00fd02fa95c648f784e5007d9366af2 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 30 May 2019 13:54:52 -0700 Subject: [PATCH] Update to latest wasi-libc (formerly wasi-sysroot) and llvm 8.0.1. The wasi-libc update here brings numerous bug fixes and minor changes, and __wasilibc_rmfileat has been renamed to __wasilibc_unlinkat. The only WebAssembly-relevant patch in the LLVM 8.0.1 update here is 4b1712f7, a fix for using /dev/null as the output file. --- .gitmodules | 6 +++--- Makefile | 10 +++++----- README.md | 6 +++--- src/llvm-project | 2 +- src/wasi-libc | 1 + src/wasi-sysroot | 1 - 6 files changed, 13 insertions(+), 13 deletions(-) create mode 160000 src/wasi-libc delete mode 160000 src/wasi-sysroot diff --git a/.gitmodules b/.gitmodules index 7ff53e2..c809da2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,9 +2,9 @@ path = src/llvm-project url = https://github.com/llvm/llvm-project branch = release/8.x -[submodule "src/wasi-sysroot"] - path = src/wasi-sysroot - url = https://github.com/CraneStation/wasi-sysroot +[submodule "src/wasi-libc"] + path = src/wasi-libc + url = https://github.com/CraneStation/wasi-libc [submodule "src/config"] path = src/config url = https://git.savannah.gnu.org/git/config.git diff --git a/Makefile b/Makefile index fe82954..ac8d3f4 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,11 @@ build/llvm.BUILT: llvm-config touch build/llvm.BUILT -build/wasi-sysroot.BUILT: build/llvm.BUILT - make -C $(ROOT_DIR)/src/wasi-sysroot \ +build/wasi-libc.BUILT: build/llvm.BUILT + make -C $(ROOT_DIR)/src/wasi-libc \ WASM_CC=$(PREFIX)/bin/clang \ SYSROOT=$(PREFIX)/share/sysroot - touch build/wasi-sysroot.BUILT + touch build/wasi-libc.BUILT build/compiler-rt.BUILT: build/llvm.BUILT mkdir -p build/compiler-rt @@ -67,7 +67,7 @@ build/compiler-rt.BUILT: build/llvm.BUILT cp -R $(ROOT_DIR)/build/llvm/lib/clang $(PREFIX)/lib/ touch build/compiler-rt.BUILT -build/libcxx.BUILT: build/llvm.BUILT build/compiler-rt.BUILT build/wasi-sysroot.BUILT +build/libcxx.BUILT: build/llvm.BUILT build/compiler-rt.BUILT build/wasi-libc.BUILT mkdir -p build/libcxx cd build/libcxx; cmake -G "Unix Makefiles" \ -DCMAKE_TOOLCHAIN_FILE=$(ROOT_DIR)/wasi-sdk.cmake \ @@ -134,7 +134,7 @@ build/config.BUILT: cp src/config/config.sub src/config/config.guess $(PREFIX)/share/misc touch build/config.BUILT -build: build/llvm.BUILT build/wasi-sysroot.BUILT build/compiler-rt.BUILT build/libcxxabi.BUILT build/libcxx.BUILT build/config.BUILT +build: build/llvm.BUILT build/wasi-libc.BUILT build/compiler-rt.BUILT build/libcxxabi.BUILT build/libcxx.BUILT build/config.BUILT strip: build/llvm.BUILT cd $(PREFIX)/bin; strip clang-8 llc lld llvm-ar diff --git a/README.md b/README.md index 8b07495..874a03a 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ This repository contains no compiler or library code itself; it uses git submodules to pull in the upstream Clang and LLVM tree, as well as the -wasi-sysroot tree. +wasi-libc tree. -The Sysroot portion of this SDK is the -[wasi-sysroot](https://github.com/CraneStation/wasi-sysroot). +The libc portion of this SDK is the +[wasi-libc](https://github.com/CraneStation/wasi-libc). Upstream Clang and LLVM 8.0 can compile for WASI out of the box, and WebAssembly support is included in them by default. So, all that's done here is to provide diff --git a/src/llvm-project b/src/llvm-project index 05288f5..e3dc222 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit 05288f5020de74ced1c22a11d9406ee2c90bb807 +Subproject commit e3dc222bd3ce1060e82ab2a8f2802a18abac834c diff --git a/src/wasi-libc b/src/wasi-libc new file mode 160000 index 0000000..92eaf25 --- /dev/null +++ b/src/wasi-libc @@ -0,0 +1 @@ +Subproject commit 92eaf255a1c484e92292157ccf4d22e7d43f033e diff --git a/src/wasi-sysroot b/src/wasi-sysroot deleted file mode 160000 index 8e8cc34..0000000 --- a/src/wasi-sysroot +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8e8cc34aadefb45955e706503fe70f582b3e3606