Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: tools/create_sdk.py

Issue 8805012: Add runtime's dart:builtin to SDK. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/create_sdk.py
===================================================================
--- tools/create_sdk.py (revision 2078)
+++ tools/create_sdk.py (working copy)
@@ -13,6 +13,9 @@
# ......frogc.dart
# ......frogsh (coming later)
# ....lib/
+# ......builtin/
+# ........builtin_runtime.dart
+# ........runtime/
# ......core/
# ........core_{compiler, frog, runtime}.dart
# ........{compiler, frog, runtime}/
@@ -46,6 +49,8 @@
def Main(argv):
# Pull in all of the gpyi files which will be munged into the sdk.
+ builtin_runtime_sources = \
+ (eval(open("runtime/bin/builtin_sources.gypi").read()))['sources']
corelib_sources = \
(eval(open("corelib/src/corelib_sources.gypi").read()))['sources']
corelib_frog_sources = \
@@ -130,6 +135,25 @@
#
+ # Create and populate lib/runtime.
+ #
+ builtin_dest_dir = join(LIB, 'builtin')
+ os.makedirs(builtin_dest_dir)
+ os.makedirs(join(builtin_dest_dir, 'runtime'))
+ for filename in builtin_runtime_sources:
+ if filename.endswith('.dart'):
+ copyfile(join(HOME, 'runtime', 'bin', filename),
+ join(builtin_dest_dir, 'runtime', filename))
+
+ # Construct lib/builtin/builtin_runtime.dart from whole cloth.
+ dest_file = open(join(builtin_dest_dir, 'builtin_runtime.dart'), 'w')
+ dest_file.write('#library("dart:builtin");\n')
+ for filename in builtin_runtime_sources:
+ if filename.endswith('.dart'):
+ dest_file.write('#source("runtime/' + filename + '");\n')
+ dest_file.close()
+
+ #
# Create and populate lib/frog.
#
frog_dest_dir = join(LIB, 'frog')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698