-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathdart_sdk.patch
83 lines (81 loc) · 1.97 KB
/
dart_sdk.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
diff --git a/BUILD.gn b/BUILD.gn
index 3dd681d9d41..a8e43bc5953 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -100,6 +100,10 @@ group("create_sdk") {
public_deps = [ "sdk:create_sdk" ]
}
+group("libdart") {
+ deps = [ "runtime/bin:libdart" ]
+}
+
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 29ada988abb..2e4cf4ea9c8 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -260,8 +260,9 @@ config("compiler") {
cflags += [ "-fPIC" ]
ldflags += [ "-fPIC" ]
} else {
- cflags += [ "-fPIE" ]
- ldflags += [ "-fPIE" ]
+ # dart_shared_library overriden - we need -fPIC to properly build
+ cflags += [ "-fPIC" ]
+ ldflags += [ "-fPIC" ]
}
}
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index be0893506f2..7c5bb919ad4 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -1170,3 +1170,47 @@ if (defined(is_linux) && is_linux && defined(is_asan) && is_asan &&
}
}
}
+
+static_library("libdart") {
+ deps = [
+ ":standalone_dart_io",
+ "..:libdart_jit",
+ "../platform:libdart_platform_jit",
+ ":dart_snapshot_cc",
+ ":dart_kernel_platform_cc",
+ "//third_party/boringssl",
+ "//third_party/zlib",
+ ]
+ if (dart_runtime_mode != "release") {
+ deps += [ "../observatory:standalone_observatory_archive" ]
+ }
+
+ complete_static_lib = true
+
+ include_dirs = [
+ "..",
+ "//third_party",
+ ]
+
+ sources = [
+ "builtin.cc",
+ "error_exit.cc",
+ "error_exit.h",
+ "vmservice_impl.cc",
+ "vmservice_impl.h",
+ "snapshot_utils.cc",
+ "snapshot_utils.h",
+ "gzip.cc",
+ "gzip.h",
+ "dartdev_isolate.cc",
+ "dartdev_isolate.h",
+ "dfe.cc",
+ "dfe.h",
+ "loader.cc",
+ "loader.h",
+ "dart_embedder_api_impl.cc",
+ ]
+ if (dart_runtime_mode == "release") {
+ sources += [ "observatory_assets_empty.cc" ]
+ }
+}