From c739a04aa198307bc5062ba32183afd118f06500 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Mon, 27 May 2024 06:39:12 +0200 Subject: [PATCH] remove llvm-project submodule This does not remove the llvm dependency for waterbox, just the submodule. The script pulling and checking out llvm kind of conflicts with the submodule, and having it be a submodule is not necessary here anyways. --- .gitmodules | 3 --- waterbox/libcxx/readme.txt | 2 +- waterbox/libcxx/setup-llvm.sh | 8 +------- waterbox/readme.txt | 3 +-- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6687ec1553..15106228fc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,9 +28,6 @@ [submodule "submodules/gambatte"] path = submodules/gambatte url = https://github.com/pokemon-speedrunning/gambatte-core.git -[submodule "waterbox/llvm-project"] - path = waterbox/llvm-project - url = https://github.com/llvm/llvm-project.git [submodule "submodules/libdarm"] path = submodules/libdarm url = https://github.com/jbremer/darm.git diff --git a/waterbox/libcxx/readme.txt b/waterbox/libcxx/readme.txt index a1e72ab915..87a982e867 100644 --- a/waterbox/libcxx/readme.txt +++ b/waterbox/libcxx/readme.txt @@ -1,6 +1,6 @@ Building and installing libcxx: 1. Run ./do-everything.sh - * This will initialize and update the llvm-project submodule if you haven't already done that + * This will initialize and/or update the llvm-project build dependency (see setup-llvm.sh) * This isn't resumable at all, so if it crashes or you're curious about the process, read its source and execute the commands individually. diff --git a/waterbox/libcxx/setup-llvm.sh b/waterbox/libcxx/setup-llvm.sh index e8b1cc6ab9..d107f3d37a 100755 --- a/waterbox/libcxx/setup-llvm.sh +++ b/waterbox/libcxx/setup-llvm.sh @@ -3,19 +3,13 @@ set -e LLVM_TAG=llvmorg-18.1.3 LLVM_DIRS="cmake compiler-rt libunwind libcxx libcxxabi runtimes" LLVM_PATH=../llvm-project -LLVM_GIT_DIR=$(git rev-parse --git-path modules/waterbox/llvm-project) if [ ! -e "$LLVM_PATH/.git" ] || ! git -C "$LLVM_PATH" rev-parse $LLVM_TAG > /dev/null 2>&1; then rm -rf "$LLVM_PATH" - git submodule deinit -f "$LLVM_PATH" - rm -rf "$LLVM_GIT_DIR" fi if [ ! -e "$LLVM_PATH/.git" ]; then - git submodule init "$LLVM_PATH" - git clone --separate-git-dir="$LLVM_GIT_DIR" --filter=tree:0 --sparse https://github.com/llvm/llvm-project.git "$LLVM_PATH" - rm "$LLVM_PATH/.git" - printf "%s\n" "gitdir: $LLVM_GIT_DIR" > "$LLVM_PATH/.git" + git clone --filter=tree:0 --sparse https://github.com/llvm/llvm-project.git "$LLVM_PATH" fi cd "$LLVM_PATH" diff --git a/waterbox/readme.txt b/waterbox/readme.txt index 141e669321..4f72700101 100644 --- a/waterbox/readme.txt +++ b/waterbox/readme.txt @@ -35,7 +35,6 @@ It consists of a modified musl libc, and build scripts to tie it all together. * waterbox/melon/melonDS (required for melonDS) * waterbox/nyma/mednafen (required for all Nyma cores) * waterbox/snes9x (required for Snes9x) - * waterbox/llvm-project is needed for the entire waterbox toolchain, but initializing and updating this is handled automatically by later scripts, so you do not need to do anything about this 3. Consider whether it is time to update your build environment (i.e. sudo apt-get upgrade). Build environment tools are generally best kept at the latest version, to ensure top performance for our users. @@ -51,7 +50,7 @@ It consists of a modified musl libc, and build scripts to tie it all together. ./do-everything.sh cd .. -4a. At ./wbox_configure, you may need to specify the compiler used. By default, it will try to use clang without a version suffix. If this is not present, it falls on the user to specify a CC variable (e.g. `CC=gcc-12 ./wbox_configure`). This is the only stage which the build tool may need to be manually specified, all future steps will remember this specification and thus need no manual input. +4a. At ./wbox_configure, you may need to specify the compiler used. By default, it will try to use clang without a version suffix. If this is not present, it falls on the user to specify a CC variable (e.g. `CC=gcc-13 ./wbox_configure`). This is the only stage which the build tool may need to be manually specified, all future steps will remember this specification and thus need no manual input. 4b. If errors happen in the libcxx part, it can be due to musl mismatching your current build environment. This happens when your build environment is updated; musl does not track its build dependencies correctly. do `make clean` on musl (and delete the non-checkedin directories just to be safe) and try again from the musl step.