diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 65a5405..2f2b6af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -417,8 +417,9 @@ jobs: # use git apply instead of git am to avoid `Committer identity unknown` error run: | - git apply $GITHUB_WORKSPACE/0001-fix-armv7-build-make-arm64-tune-work.patch - git apply $GITHUB_WORKSPACE/0002-always-include-debug-symbols.patch + git apply $GITHUB_WORKSPACE/0001-allow-downloading-linux-sysroot-on-darwin.patch + git apply $GITHUB_WORKSPACE/0002-fix-armv7-build-make-arm64-tune-work.patch + git apply $GITHUB_WORKSPACE/0003-always-include-debug-symbols.patch - name: Show git status working-directory: engine/src diff --git a/0001-allow-downloading-linux-sysroot-on-darwin.patch b/0001-allow-downloading-linux-sysroot-on-darwin.patch new file mode 100644 index 0000000..065b412 --- /dev/null +++ b/0001-allow-downloading-linux-sysroot-on-darwin.patch @@ -0,0 +1,25 @@ +From d03cd38f90e0e4cbc4a37cbfeb34c65ed3ddeefe Mon Sep 17 00:00:00 2001 +From: Hannes Winkler +Date: Mon, 27 Mar 2023 12:42:17 +0200 +Subject: [PATCH 1/3] allow downloading linux sysroot on darwin + +--- + build/linux/sysroot_scripts/install-sysroot.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py +index d3e7664..6dfbe42 100755 +--- a/build/linux/sysroot_scripts/install-sysroot.py ++++ b/build/linux/sysroot_scripts/install-sysroot.py +@@ -77,7 +77,7 @@ def main(args): + parser.add_option('--print-hash', + help='Print the hash of the sysroot for the given arch.') + options, _ = parser.parse_args(args) +- if not sys.platform.startswith('linux'): ++ if not (sys.platform.startswith('linux') or sys.platform.startswith('darwin')): + return 0 + + if options.print_hash: +-- +2.39.2 + diff --git a/0001-fix-armv7-build-make-arm64-tune-work.patch b/0002-fix-armv7-build-make-arm64-tune-work.patch similarity index 96% rename from 0001-fix-armv7-build-make-arm64-tune-work.patch rename to 0002-fix-armv7-build-make-arm64-tune-work.patch index f5110bf..1fc8943 100644 --- a/0001-fix-armv7-build-make-arm64-tune-work.patch +++ b/0002-fix-armv7-build-make-arm64-tune-work.patch @@ -1,7 +1,7 @@ -From 66d13274d3e0214a334a89c317ca91767c874131 Mon Sep 17 00:00:00 2001 +From 44c7f560828270e9944b806f55a2de15b4d5b710 Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Wed, 11 Aug 2021 02:21:25 +0200 -Subject: [PATCH 1/2] fix armv7 build - make arm64 tune work +Subject: [PATCH 2/3] fix armv7 build - make arm64 tune work --- build/config/arm.gni | 27 +++------- @@ -57,19 +57,19 @@ index 7a293e6..1c6ff69 100644 arm_float_abi = "softfp" } diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 4c9a1ee..d136413 100644 +index 148c97e..cd2e662 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -3,7 +3,7 @@ - # found in the LICENSE file. +@@ -4,7 +4,7 @@ import("//build/config/android/config.gni") + import("//build/toolchain/wasm.gni") -if (current_cpu == "arm") { +if (current_cpu == "arm" || current_cpu == "arm64") { import("//build/config/arm.gni") } if (is_posix) { -@@ -207,33 +207,78 @@ config("compiler") { +@@ -211,33 +211,78 @@ config("compiler") { ] } } else if (current_cpu == "arm") { @@ -193,4 +193,5 @@ index 7987e51..2c225a0 100644 exec_script("//build/dir_exists.py", [ sysroot ], "string") == "True", "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$current_cpu") -- -2.25.1 +2.39.2 + diff --git a/0002-always-include-debug-symbols.patch b/0003-always-include-debug-symbols.patch similarity index 64% rename from 0002-always-include-debug-symbols.patch rename to 0003-always-include-debug-symbols.patch index 9a7e035..4671c75 100644 --- a/0002-always-include-debug-symbols.patch +++ b/0003-always-include-debug-symbols.patch @@ -1,28 +1,28 @@ -From c8afa410df725d2f0e2493fc0c24724a0d060671 Mon Sep 17 00:00:00 2001 +From ab2a5fd6b3b2384fa7ec975c1b1b4754eb540d47 Mon Sep 17 00:00:00 2001 From: Hannes Winkler Date: Thu, 22 Jun 2023 16:30:00 +0000 -Subject: [PATCH 2/2] always include debug symbols - always build with `-ggdb - -fdebug-default-version=4` by default. - symbols are stripped later anyway - and they're still useful for debugging. +Subject: [PATCH 3/3] always include debug symbols +Always build with `-ggdb -fdebug-default-version=4` by default. +Symbols are stripped later anyway and they're still useful for debugging. --- build/config/compiler/BUILD.gn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index d136413..59b0243 100644 +index cd2e662..cce2c1a 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -996,7 +996,7 @@ config("symbols") { +@@ -1015,7 +1015,7 @@ config("symbols") { + ldflags = [ "-gsource-map"] } - ldflags = [ "/DEBUG" ] } else { - cflags = [ "-g2" ] + cflags = [ "-ggdb", "-fdebug-default-version=4" ] } } -@@ -1005,12 +1005,12 @@ config("minimal_symbols") { +@@ -1024,12 +1024,12 @@ config("minimal_symbols") { # Linker symbols for backtraces only. ldflags = [ "/DEBUG" ] } else { @@ -38,4 +38,5 @@ index d136413..59b0243 100644 } } -- -2.25.1 +2.39.2 +