Skip to content

Commit 4e454e3

Browse files
committed
💚 Fix linux build
1 parent 0d160fa commit 4e454e3

File tree

2 files changed

+28
-6
lines changed

2 files changed

+28
-6
lines changed

.github/workflows/build.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [windows-latest, ubuntu-latest]
12+
include:
13+
- os: windows-latest
14+
postfix: win
15+
- os: ubuntu-latest
16+
postfix: linux
1217
env:
1318
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
1419
continue-on-error: true
@@ -27,6 +32,8 @@ jobs:
2732
- name: 'Upload Artifact'
2833
uses: actions/upload-artifact@v3
2934
with:
30-
name: libs
31-
path: ./build/src/Release/
35+
name: libs-${{ matrix.postfix }}
36+
path: |
37+
./build/src/Release/
38+
./build/src/*.so
3239

dart_sdk.patch

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/BUILD.gn b/BUILD.gn
2-
index 40bd3062436..159239e17e2 100644
2+
index 4d88fd67d86..5898483f0e9 100644
33
--- a/BUILD.gn
44
+++ b/BUILD.gn
5-
@@ -95,6 +95,10 @@ group("create_sdk") {
5+
@@ -99,6 +99,10 @@ group("create_sdk") {
66
public_deps = [ "sdk:create_sdk" ]
77
}
88

@@ -13,11 +13,26 @@ index 40bd3062436..159239e17e2 100644
1313
group("create_platform_sdk") {
1414
public_deps = [ "sdk:create_platform_sdk" ]
1515
}
16+
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
17+
index f6c2c6625dc..f3986381da4 100644
18+
--- a/build/config/compiler/BUILD.gn
19+
+++ b/build/config/compiler/BUILD.gn
20+
@@ -250,8 +250,8 @@ config("compiler") {
21+
}
22+
23+
if (is_android || is_linux || is_mac || is_fuchsia) {
24+
- cflags += [ "-fPIE" ]
25+
- ldflags += [ "-fPIE" ]
26+
+ cflags += [ "-fPIC" ]
27+
+ ldflags += [ "-fPIC" ]
28+
}
29+
30+
# Linux-specific compiler flags setup.
1631
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
17-
index 2877fb33775..e37f18bd2f1 100644
32+
index e757b71d483..aa10a453907 100644
1833
--- a/runtime/bin/BUILD.gn
1934
+++ b/runtime/bin/BUILD.gn
20-
@@ -1107,3 +1107,49 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan &&
35+
@@ -1110,3 +1110,49 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan &&
2136
}
2237
}
2338
}

0 commit comments

Comments
 (0)