Skip to content

Commit 603fd78

Browse files
sigmundchcommit-bot@chromium.org
authored and
commit-bot@chromium.org
committed
(ddc) Fix deps tracking for the ddc sdk.
The compile_platform template assumes that the output will be in the root-out-dir, and because of that the generated .deps file contains relative paths that only work if the output is in that folder. It would be nice to fix compile_platform to be more flexible about this, but for now moving the output up fixes the issue that modifications in the sdk were not triggering a rebuild. Change-Id: Ifc1e7adb23d6911a9f71c341b7968e0a9b1d4973 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126122 Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Sigmund Cherem <sigmund@google.com>
1 parent 6294c73 commit 603fd78

File tree

6 files changed

+13
-9
lines changed

6 files changed

+13
-9
lines changed

pkg/dev_compiler/test/sourcemap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ For both there are 2 suits: One for (legacy) DDC and one for DDC with kernel (DD
77

88
Running the tests likely requires the compilation of the correct targets. DDK currently also
99
requires `ddc_sdk.dill` inside
10-
`{sdkroot}/{out,xcodebuild}/ReleaseX64/gen/utils/dartdevc/kernel/ddc_sdk.dill`.
10+
`{sdkroot}/{out,xcodebuild}/ReleaseX64/ddc_sdk.dill`.
1111

1212
Except for that, running them should simply be a matter of executing the `*_suite.dart` files.
1313

pkg/dev_compiler/test/sourcemap/sourcemaps_ddk_suite.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class DevCompilerRunner implements CompilerRunner {
5656
File sdkJsFile = findInOutDir("gen/utils/dartdevc/js/es6/dart_sdk.js");
5757
var jsSdkPath = sdkJsFile.uri;
5858

59-
File ddcSdkSummary = findInOutDir("gen/utils/dartdevc/kernel/ddc_sdk.dill");
59+
File ddcSdkSummary = findInOutDir("ddc_sdk.dill");
6060

6161
List<String> args = <String>[
6262
"--packages=${sdkRoot.uri.resolve(".packages").toFilePath()}",

pkg/dev_compiler/tool/ddc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ then
5151
fi
5252
fi
5353

54-
GEN_DIR="$OUT_DIR"/"$DART_CONFIGURATION"/gen/utils/dartdevc
54+
ROOT_OUT_DIR="$OUT_DIR"/"$DART_CONFIGURATION"
55+
GEN_DIR="$ROOT_OUT_DIR"/gen/utils/dartdevc
5556

5657
KERNEL=false
5758
if [ "$1" = "-k" ]; then
@@ -64,7 +65,7 @@ LIBROOT=$(cd $( dirname "${1%.*}") && pwd)
6465

6566
if [ "$KERNEL" = true ]; then
6667

67-
if [ ! -e $GEN_DIR/kernel/ddc_sdk.dill ]; then
68+
if [ ! -e $ROOT_OUT_DIR/ddc_sdk.dill ]; then
6869
echo "DDC SDK must be built first, please run:"
6970
echo " pushd $SDKDIR"
7071
echo " ./tools/build.py -m release dartdevc_kernel_sdk"
@@ -74,7 +75,7 @@ if [ "$KERNEL" = true ]; then
7475
NODE_PATH=$GEN_DIR/kernel/common:$LIBROOT:$NODE_PATH
7576

7677
$SDK_DIR/sdk/bin/dartdevc --kernel --modules=node \
77-
--dart-sdk-summary=$GEN_DIR/ddc_sdk.sum \
78+
--dart-sdk-summary=$ROOT_OUT_DIR/ddc_sdk.dill \
7879
-o $LIBROOT/$BASENAME.js $*
7980
else
8081

sdk/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ copy("copy_dev_compiler_summary") {
697697
sources = [
698698
# TODO(vsm): Remove post CFE.
699699
"$gen_dir/ddc_sdk.sum",
700-
"$gen_dir/kernel/ddc_sdk.dill",
700+
"$root_out_dir/ddc_sdk.dill",
701701
]
702702
outputs = [
703703
"$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}",

sdk_nnbd/BUILD.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ copy("copy_dev_compiler_summary") {
697697
sources = [
698698
# TODO(vsm): Remove post CFE.
699699
"$gen_dir/ddc_sdk.sum",
700-
"$gen_dir/kernel/ddc_sdk.dill",
700+
"$root_out_dir/ddc_sdk.dill",
701701
]
702702
outputs = [
703703
"$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}",

utils/dartdevc/BUILD.gn

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ import("../create_timestamp.gni")
1010

1111
patched_sdk_dir = "$target_gen_dir/patched_sdk"
1212
sdk_summary = "$target_gen_dir/ddc_sdk.sum"
13-
sdk_outline_dill = "$target_gen_dir/kernel/ddc_sdk.dill"
14-
sdk_full_dill = "$target_gen_dir/kernel/ddc_sdk_full.dill"
13+
14+
# TODO(sigmund): rename to ddc_outline.dill to be consistent with the naming
15+
# convention from other tools.
16+
sdk_outline_dill = "$root_out_dir/ddc_sdk.dill"
17+
sdk_full_dill = "$root_out_dir/ddc_platform.dill"
1518

1619
if (use_nnbd) {
1720
libraries_specification_path = "sdk_nnbd/lib/libraries.json"

0 commit comments

Comments
 (0)