Fix ddc and ddw

Bug:
Change-Id: Idf1f7872ef27cd0e0196a58fdee5587084380701
Reviewed-on: https://dart-review.googlesource.com/22860
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
This commit is contained in:
Vijay Menon 2017-11-22 03:01:47 +00:00 committed by commit-bot@chromium.org
parent a8af34f467
commit c5e3da6ba0
2 changed files with 11 additions and 7 deletions

View file

@ -19,11 +19,13 @@ fi
BASENAME=$( basename "${1%.*}")
LIBROOT=$(cd $( dirname "${1%.*}") && pwd)
export NODE_PATH=$DDC_PATH/lib/js/common:$LIBROOT:$NODE_PATH
# TODO(vsm): Change this to use the regular built version of the summaries
# and the SDK.
export NODE_PATH=$DDC_PATH/gen/sdk/common:$LIBROOT:$NODE_PATH
# Build the SDK in a place where we can find it if it's not already there.
if [ ! -e gen/sdk/ddc_sdk.sum ]; then
./tool/build_sdk.sh
if [ ! -e $DDC_PATH/gen/sdk/ddc_sdk.sum ]; then
$DDC_PATH/tool/build_sdk.sh
fi
if [ "$KERNEL" = true ]; then

View file

@ -20,11 +20,13 @@ fi
BASENAME=$( basename "${1%.*}")
LIBROOT=$(cd $( dirname "${1%.*}") && pwd)
export NODE_PATH=$DDC_PATH/lib/js/common:$LIBROOT:$NODE_PATH
# TODO(vsm): Change this to use the regular built version of the summaries
# and the SDK.
export NODE_PATH=$DDC_PATH/gen/sdk/common:$LIBROOT:$NODE_PATH
# Build the SDK in a place where we can find it if it's not already there.
if [ ! -e gen/sdk/ddc_sdk.sum ]; then
./tool/build_sdk.sh
if [ ! -e $DDC_PATH/gen/sdk/ddc_sdk.sum ]; then
$DDC_PATH/tool/build_sdk.sh
fi
if [ "$KERNEL" = true ]; then
@ -43,7 +45,7 @@ echo "
const originalResolveFilename = Module._resolveFilename;
Module._resolveFilename = function (request, parent, isMain) {
let paths = parent.paths;
const ddcPath = \"$DDC_PATH/lib/js/common\";
const ddcPath = \"$DDC_PATH/gen/sdk/common\";
if (paths[0] != ddcPath) {
paths.splice(0, 0, ddcPath, \"$LIBROOT\");
}