From df93af002bc74319653c5b1f97914d13a4fd4482 Mon Sep 17 00:00:00 2001
From: Corwin Kuiper <corwin@kuiper.dev>
Date: Sat, 3 Jul 2021 18:30:49 +0100
Subject: [PATCH] disable most of everything else

---
 mgba-test-runner/build-mgba.sh | 21 ++++++++++++++++++++-
 mgba-test-runner/build.rs      |  1 -
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/mgba-test-runner/build-mgba.sh b/mgba-test-runner/build-mgba.sh
index d291e68b..298a8565 100644
--- a/mgba-test-runner/build-mgba.sh
+++ b/mgba-test-runner/build-mgba.sh
@@ -10,7 +10,26 @@ cd mgba-${MGBA_VERSION}
 rm -rf build
 mkdir -p build
 cd build
-cmake .. -DBUILD_STATIC=ON -DBUILD_SHARED=OFF -DDISABLE_FRONTENDS=ON -DBUILD_GL=OFF -DBUILD_GLES2=OFF -DUSE_DISCORD_RPC=OFF -DUSE_PNG=OFF
+cmake .. \
+    -DBUILD_STATIC=ON \
+    -DBUILD_SHARED=OFF \
+    -DDISABLE_FRONTENDS=ON \
+    -DBUILD_GL=OFF \
+    -DBUILD_GLES2=OFF \
+    -DUSE_GDB_STUB=OFF \
+	-DUSE_FFMPEG=OFF \
+	-DUSE_ZLIB=OFF \
+	-DUSE_MINIZIP=OFF \
+	-DUSE_PNG=OFF \
+	-DUSE_LIBZIP=OFF \
+	-DUSE_SQLITE3=OFF \
+	-DUSE_ELF=ON \
+	-DM_CORE_GBA=ON \
+	-DM_CORE_GB=OFF \
+	-DUSE_LZMA=OFF \
+	-DUSE_DISCORD_RPC=OFF \
+	-DENABLE_SCRIPTING=OFF \
+    -DUSE_EPOXY=OFF
 make
 
 cp libmgba.a ../../libmgba-cycle.a
diff --git a/mgba-test-runner/build.rs b/mgba-test-runner/build.rs
index ee186893..6d373419 100644
--- a/mgba-test-runner/build.rs
+++ b/mgba-test-runner/build.rs
@@ -13,7 +13,6 @@ fn main() {
         .expect("should be able to build mgba");
     println!("cargo:rustc-link-search={}", out_path.to_str().unwrap());
     println!("cargo:rustc-link-lib=static={}", "mgba-cycle");
-    println!("cargo:rustc-link-lib=z");
     println!("cargo:rustc-link-lib=elf");
 
     cc::Build::new()