From 4e454e37da8cdc8d9c5cc93934fba1226f055d08 Mon Sep 17 00:00:00 2001 From: Jeff Ward Date: Sun, 24 Sep 2023 15:06:11 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20linux=20build?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 11 +++++++++-- dart_sdk.patch | 23 +++++++++++++++++++---- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d8b419c..ce8dc10 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -9,6 +9,11 @@ jobs: strategy: matrix: os: [windows-latest, ubuntu-latest] + include: + - os: windows-latest + postfix: win + - os: ubuntu-latest + postfix: linux env: DEPOT_TOOLS_WIN_TOOLCHAIN: 0 continue-on-error: true @@ -27,6 +32,8 @@ jobs: - name: 'Upload Artifact' uses: actions/upload-artifact@v3 with: - name: libs - path: ./build/src/Release/ + name: libs-${{ matrix.postfix }} + path: | + ./build/src/Release/ + ./build/src/*.so \ No newline at end of file diff --git a/dart_sdk.patch b/dart_sdk.patch index 16e2e89..13aa19c 100644 --- a/dart_sdk.patch +++ b/dart_sdk.patch @@ -1,8 +1,8 @@ diff --git a/BUILD.gn b/BUILD.gn -index 40bd3062436..159239e17e2 100644 +index 4d88fd67d86..5898483f0e9 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -95,6 +95,10 @@ group("create_sdk") { +@@ -99,6 +99,10 @@ group("create_sdk") { public_deps = [ "sdk:create_sdk" ] } @@ -13,11 +13,26 @@ index 40bd3062436..159239e17e2 100644 group("create_platform_sdk") { public_deps = [ "sdk:create_platform_sdk" ] } +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index f6c2c6625dc..f3986381da4 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -250,8 +250,8 @@ config("compiler") { + } + + if (is_android || is_linux || is_mac || is_fuchsia) { +- cflags += [ "-fPIE" ] +- ldflags += [ "-fPIE" ] ++ cflags += [ "-fPIC" ] ++ ldflags += [ "-fPIC" ] + } + + # Linux-specific compiler flags setup. diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn -index 2877fb33775..e37f18bd2f1 100644 +index e757b71d483..aa10a453907 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn -@@ -1107,3 +1107,49 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan && +@@ -1110,3 +1110,49 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan && } } }