pull/161/head
Dan Gohman 5 years ago
parent 03fd284502
commit bd4e3e7e7c

@ -55,7 +55,6 @@ clean:
build/llvm.BUILT: build/llvm.BUILT:
mkdir -p build/llvm mkdir -p build/llvm
cd build/llvm && cmake -G Ninja \ cd build/llvm && cmake -G Ninja \
-DCMAKE_MODULE_PATH=$(ROOT_DIR)/cmake \
-DCMAKE_BUILD_TYPE=MinSizeRel \ -DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=$(PREFIX) \ -DCMAKE_INSTALL_PREFIX=$(PREFIX) \
-DLLVM_TARGETS_TO_BUILD=WebAssembly \ -DLLVM_TARGETS_TO_BUILD=WebAssembly \
@ -95,8 +94,8 @@ build/wasi-libc.BUILT: build/llvm.BUILT
build/compiler-rt.BUILT: build/llvm.BUILT build/compiler-rt.BUILT: build/llvm.BUILT
# Create an empty library so that cmake's configure checks which # Create an empty library so that cmake's configure checks which
# run the compiler to see if it produces working binaries succeed. # run the compiler to see if it produces working binaries succeed.
mkdir -p $(PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi mkdir -p $(BUILD_PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi
$(AR) cr $(PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi/libclang_rt.builtins-wasm32.a $(AR) cr $(BUILD_PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi/libclang_rt.builtins-wasm32.a
# Do the build, and install it. # Do the build, and install it.
mkdir -p build/compiler-rt mkdir -p build/compiler-rt
cd build/compiler-rt && cmake -G Ninja \ cd build/compiler-rt && cmake -G Ninja \
@ -148,9 +147,9 @@ LIBCXX_CMAKE_FLAGS = \
build/libcxx.BUILT: build/llvm.BUILT build/compiler-rt.BUILT build/wasi-libc.BUILT build/libcxx.BUILT: build/llvm.BUILT build/compiler-rt.BUILT build/wasi-libc.BUILT
# Create an empty library so that cmake's configure checks which # Create an empty library so that cmake's configure checks which
# run the compiler to see if it produces working binaries succeed. # run the compiler to see if it produces working binaries succeed.
mkdir -p $(PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi mkdir -p $(BUILD_PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi
$(AR) cr $(PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++.a $(AR) cr $(BUILD_PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++.a
$(AR) cr $(PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a $(AR) cr $(BUILD_PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++abi.a
# Do the build. # Do the build.
mkdir -p build/libcxx mkdir -p build/libcxx
cd build/libcxx && cmake -G Ninja $(LIBCXX_CMAKE_FLAGS) \ cd build/libcxx && cmake -G Ninja $(LIBCXX_CMAKE_FLAGS) \
@ -193,8 +192,8 @@ LIBCXXABI_CMAKE_FLAGS = \
build/libcxxabi.BUILT: build/libcxx.BUILT build/llvm.BUILT build/libcxxabi.BUILT: build/libcxx.BUILT build/llvm.BUILT
# Create an empty library so that cmake's configure checks which # Create an empty library so that cmake's configure checks which
# run the compiler to see if it produces working binaries succeed. # run the compiler to see if it produces working binaries succeed.
mkdir -p $(PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi mkdir -p $(BUILD_PREFIX)/lib/clang/$(CLANG_VERSION)/lib/wasi
$(AR) cr $(PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++.a $(AR) cr $(BUILD_PREFIX)/share/wasi-sysroot/lib/wasm32-wasi/libc++.a
# Do the build. # Do the build.
mkdir -p build/libcxxabi mkdir -p build/libcxxabi
cd build/libcxxabi && cmake -G Ninja $(LIBCXXABI_CMAKE_FLAGS) \ cd build/libcxxabi && cmake -G Ninja $(LIBCXXABI_CMAKE_FLAGS) \

Loading…
Cancel
Save