From 2a8f85e76daf2a72b0517666867840f06ecf093e Mon Sep 17 00:00:00 2001 From: Po-yao Chang Date: Sat, 17 Feb 2024 02:13:29 +0800 Subject: [PATCH] Install libc++ modules std and std.compat (#59) --- build/build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/build.sh b/build/build.sh index ba79078..8ba5816 100755 --- a/build/build.sh +++ b/build/build.sh @@ -188,13 +188,13 @@ mlir-*) VERSION=trunk-$(date +%Y%m%d) PATCHES_TO_APPLY+=("${ROOT}/patches/ce-debug-clang-trunk.patch") LLVM_EXPERIMENTAL_TARGETS_TO_BUILD="DirectX;SPIRV;M68k" - CMAKE_EXTRA_ARGS+=("-DCLANG_ENABLE_HLSL=On") + CMAKE_EXTRA_ARGS+=("-DCLANG_ENABLE_HLSL=On" "-DLIBCXX_INSTALL_MODULES=ON") LLVM_ENABLE_RUNTIMES+=";libunwind" ;; assertions-trunk) BRANCH=main VERSION=assertions-trunk-$(date +%Y%m%d) - CMAKE_EXTRA_ARGS+=("-DLLVM_ENABLE_ASSERTIONS=ON") + CMAKE_EXTRA_ARGS+=("-DLLVM_ENABLE_ASSERTIONS=ON" "-DLIBCXX_INSTALL_MODULES=ON") LLVM_ENABLE_RUNTIMES+=";libunwind" PATCHES_TO_APPLY+=("${ROOT}/patches/ce-debug-clang-trunk.patch") ;; @@ -238,6 +238,10 @@ mlir-*) PATCHES_TO_APPLY+=("${ROOT}/patches/ce-debug-clang-trunk.patch") LLVM_EXPERIMENTAL_TARGETS_TO_BUILD="M68k;WebAssembly" fi + + if [[ $MAJOR -ge 18 ]]; then + CMAKE_EXTRA_ARGS+=("-DLIBCXX_INSTALL_MODULES=ON") + fi ;; esac ;;