Skip to content

Commit 064c3c7

Browse files
munificentcommit-bot@chromium.org
authored andcommitted
Get the DDK build working with NNBD.
When use_nnbd is set, make the build steps for generating the DDK SDK summary and JS use the forked SDK directory and enable the non-nullable experiment flag. Change-Id: Ia483a621dccd40245cdf5e2c1f7fd86b9bc1e266 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122162 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
1 parent 57a88fc commit 064c3c7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

utils/dartdevc/BUILD.gn

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,14 +349,19 @@ prebuilt_dart_action("dartdevc_kernel_sdk_outline") {
349349
"--multi-root-scheme",
350350
"org-dartlang-sdk",
351351
"--multi-root",
352-
rebase_path("../../sdk"),
352+
rebase_path(sdk_root),
353353
"--libraries-file",
354354
"file:///" + rebase_path("$sdk_root/lib/libraries.json"),
355355
"--output",
356356
rebase_path(sdk_dill),
357357
"--source",
358358
"dart:core",
359359
]
360+
361+
# TODO(38701): Cleanup after merging the forked SDK into mainline.
362+
if (use_nnbd) {
363+
args += [ "--enable-experiment=non-nullable" ]
364+
}
360365
}
361366

362367
copy("dartdevc_kernel_sdk_libraries_json") {
@@ -424,4 +429,9 @@ prebuilt_dart_action("dartdevc_kernel_sdk") {
424429
"-o",
425430
rebase_path("$target_gen_dir/kernel/legacy/dart_sdk.js"),
426431
]
432+
433+
# TODO(38701): Cleanup after merging the forked SDK into mainline.
434+
if (use_nnbd) {
435+
args += [ "--enable-experiment=non-nullable" ]
436+
}
427437
}

0 commit comments

Comments
 (0)