From 03fd284502655a23bfa43ba2b1f0878de05452b4 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 14 Oct 2020 16:21:37 -0700 Subject: [PATCH] Add --sysroot to compiler-rt's C flags. This ensures that it finds the built sysroot when testing whether the C compiler works. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 163eff5..a76e0db 100644 --- a/Makefile +++ b/Makefile @@ -110,7 +110,7 @@ build/compiler-rt.BUILT: build/llvm.BUILT -DCOMPILER_RT_ENABLE_IOS=OFF \ -DCOMPILER_RT_DEFAULT_TARGET_ONLY=On \ -DWASI_SDK_PREFIX=$(BUILD_PREFIX) \ - -DCMAKE_C_FLAGS="-O1 $(DEBUG_PREFIX_MAP)" \ + -DCMAKE_C_FLAGS="$(DEBUG_PREFIX_MAP) --sysroot=$(BUILD_PREFIX)/share/wasi-sysroot" \ -DLLVM_CONFIG_PATH=$(ROOT_DIR)/build/llvm/bin/llvm-config \ -DCOMPILER_RT_OS_DIR=wasi \ -DCMAKE_INSTALL_PREFIX=$(PREFIX)/lib/clang/$(CLANG_VERSION)/ \