mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Added switch to disable generating cached_patches.dart file (Dartium only).
The switch --no-cached-patches to be used by Dart enlistment (non-Dartium) and need to re-gen the sdk/lib files using: ./go.sh --no-cached-patches R=alanknight@google.com Review URL: https://codereview.chromium.org/2154863002 .
This commit is contained in:
parent
941691650c
commit
2b1816c869
2 changed files with 31 additions and 9 deletions
|
@ -287,6 +287,9 @@ def main():
|
|||
parser.add_option('--gen-interop', dest='dart_js_interop',
|
||||
action='store_true', default=False,
|
||||
help='Use Javascript objects (dart:js) accessing the DOM in _blink')
|
||||
parser.add_option('--no-cached-patches', dest='no_cached_patches',
|
||||
action='store_true', default=False,
|
||||
help='Do not generate the sdk/lib/js/cached_patches.dart file')
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
@ -346,13 +349,14 @@ def main():
|
|||
os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name),
|
||||
os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium'))
|
||||
|
||||
# Blow away the cached_patches.dart needs to be re-generated for Dartium
|
||||
# see tools/dartium/generate_patches.sh
|
||||
cached_patches_filename = os.path.join('..', '..', '..', 'sdk', 'lib', 'js', 'dartium',
|
||||
'cached_patches.dart')
|
||||
cached_patches = open(cached_patches_filename, 'w')
|
||||
cached_patches.write(CACHED_PATCHES);
|
||||
cached_patches.close()
|
||||
if (not(options.no_cached_patches)):
|
||||
# Blow away the cached_patches.dart needs to be re-generated for Dartium
|
||||
# see tools/dartium/generate_patches.sh
|
||||
cached_patches_filename = os.path.join('..', '..', '..', 'sdk', 'lib', 'js', 'dartium',
|
||||
'cached_patches.dart')
|
||||
cached_patches = open(cached_patches_filename, 'w')
|
||||
cached_patches.write(CACHED_PATCHES);
|
||||
cached_patches.close()
|
||||
|
||||
if '_blink' in systems:
|
||||
_logger.info('Generating dartium _blink file.')
|
||||
|
|
|
@ -20,6 +20,12 @@ set -x
|
|||
#
|
||||
# ./go.sh dart2js,htmldartium
|
||||
#
|
||||
# To re-gen all sdk/lib files (outside of a Dartium enlistment the file
|
||||
# 'sdk/lib/js/cached_patches.dart' might not need to be generated). To run
|
||||
# go.sh w/o the patches files used --no-cached-patches switch e.g.,
|
||||
#
|
||||
# ./go.sh --no-cached-patches
|
||||
#
|
||||
# The following gives a picture of the changes due to 'work'
|
||||
#
|
||||
# git checkout master # select client without changes
|
||||
|
@ -33,8 +39,20 @@ ALLSYSTEMS="htmldart2js,htmldartium,_blink"
|
|||
SYSTEMS="$ALLSYSTEMS"
|
||||
|
||||
if [[ "$1" != "" ]] ; then
|
||||
SYSTEMS="$1"
|
||||
if [[ "$1" =~ ^-- ]]; then
|
||||
ARG_OPTION="$1"
|
||||
else
|
||||
SYSTEMS="$1"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$2" != "" ]] ; then
|
||||
if [[ "$2" =~ ^-- ]]; then
|
||||
ARG_OPTION="$2"
|
||||
else
|
||||
SYSTEMS="$2"
|
||||
fi
|
||||
fi
|
||||
|
||||
reset && \
|
||||
./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata --gen-interop
|
||||
./dartdomgenerator.py --systems="$SYSTEMS" --logging=40 --update-dom-metadata --gen-interop "$ARG_OPTION"
|
||||
|
|
Loading…
Reference in a new issue