Skip to content

Commit 48c8417

Browse files
committed
feat: Update to Dart 3.8.1
1 parent 0d692ca commit 48c8417

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

.dart_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# This file contains the current Dart version we build against
2-
3.6.2
2+
3.8.1

dart_sdk.patch

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
diff --git a/BUILD.gn b/BUILD.gn
2-
index 3dd681d9d41..a8e43bc5953 100644
2+
index fb3ca5fc537..9760a092244 100644
33
--- a/BUILD.gn
44
+++ b/BUILD.gn
5-
@@ -100,6 +100,10 @@ group("create_sdk") {
6-
public_deps = [ "sdk:create_sdk" ]
5+
@@ -127,6 +127,10 @@ group("create_platform_sdk") {
6+
public_deps = [ "sdk:create_platform_sdk" ]
77
}
88

99
+group("libdart") {
1010
+ deps = [ "runtime/bin:libdart" ]
1111
+}
1212
+
13-
group("create_platform_sdk") {
14-
public_deps = [ "sdk:create_platform_sdk" ]
15-
}
13+
group("dart2js") {
14+
import("runtime/runtime_args.gni")
15+
if (dart_target_arch != "ia32" && dart_target_arch != "x86") {
1616
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
17-
index 29ada988abb..2e4cf4ea9c8 100644
17+
index b77bab8676c..b9739fab43a 100644
1818
--- a/build/config/compiler/BUILD.gn
1919
+++ b/build/config/compiler/BUILD.gn
20-
@@ -260,8 +260,9 @@ config("compiler") {
20+
@@ -254,8 +254,9 @@ config("compiler") {
2121
cflags += [ "-fPIC" ]
2222
ldflags += [ "-fPIC" ]
2323
} else {
@@ -30,12 +30,12 @@ index 29ada988abb..2e4cf4ea9c8 100644
3030
}
3131

3232
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
33-
index be0893506f2..7c5bb919ad4 100644
33+
index 57d7006036d..fd677355210 100644
3434
--- a/runtime/bin/BUILD.gn
3535
+++ b/runtime/bin/BUILD.gn
36-
@@ -1170,3 +1170,47 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan &&
37-
}
38-
}
36+
@@ -1224,3 +1224,47 @@ static_library("dart_embedder_runtime_jit") {
37+
output_name = "dart_embedder_runtime_jit"
38+
deps = [ ":dart_embedder_runtime_jit_set" ]
3939
}
4040
+
4141
+static_library("libdart") {

examples/realtime_example/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ target_include_directories(realtime_example PRIVATE
3030
if(LINUX)
3131
# -export-dynamic is required on Linux if your symbols are in your executable,
3232
# otherwise dlsym (and therefore Dart FFI) can't find them.
33-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -export-dynamic")
33+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-export-dynamic")
3434
endif()
3535

3636
if (WIN32)

examples/realtime_example/dart/main.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ double dotX = 0;
2626
double dotY = 0;
2727
bool movingLeft = true;
2828

29+
@pragma("vm:entry-point")
2930
void main() {
3031
print('main');
3132
walls.add(
@@ -48,6 +49,7 @@ void main() {
4849
drawable.ref.color.b = 0.0;
4950
}
5051

52+
@pragma("vm:entry-point")
5153
void frame(double dt) {
5254
if (movingLeft) {
5355
dotX -= (speed * dt);

src/isolate_setup.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ Dart_Isolate CreateIsolate(bool is_main_isolate,
183183
uint8_t* kernel_buffer = nullptr;
184184
intptr_t kernel_buffer_size;
185185
AppSnapshot* app_snapshot = nullptr;
186-
std::shared_ptr<uint8_t> kernel_buffer_ptr;
187186

188187
bool isolate_run_app_snapshot = false;
189188
const uint8_t* isolate_snapshot_data = kDartCoreIsolateSnapshotData;
@@ -212,8 +211,7 @@ Dart_Isolate CreateIsolate(bool is_main_isolate,
212211

213212
if (kernel_buffer == nullptr && !isolate_run_app_snapshot) {
214213
dfe.ReadScript(script_uri, app_snapshot, &kernel_buffer,
215-
&kernel_buffer_size, /*decode_uri=*/true,
216-
&kernel_buffer_ptr);
214+
&kernel_buffer_size, /*decode_uri=*/true);
217215
}
218216

219217
flags->null_safety = true;

0 commit comments

Comments
 (0)