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

Unified Diff: runtime/tools/create_archive.py

Issue 1416293003: Some cleanups to observatory BUILD.gn (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 months 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 | « runtime/observatory/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tools/create_archive.py
diff --git a/runtime/tools/create_archive.py b/runtime/tools/create_archive.py
index dcb6a9008a06e0d7b01198b42cfdc18a7d675b02..8a5f2a3f9eeb679d4a2ff25164fefa9742b65d13 100644
--- a/runtime/tools/create_archive.py
+++ b/runtime/tools/create_archive.py
@@ -40,12 +40,23 @@ def writeCCFile(output_file,
// BSD-style license that can be found in the LICENSE file.
''' % date.today().year
+ cc_text += '''
+
+#if defined(_WIN32)
+typedef unsigned __int8 uint8_t;
+#else
+#include <inttypes.h>
+#include <stdint.h>
+#endif
+#include <stddef.h>
+
+'''
cc_text += 'namespace %s {\n' % outer_namespace
if inner_namespace != None:
cc_text += 'namespace %s {\n' % inner_namespace
cc_text += '\n\n'
# Write the archive.
- cc_text += 'static const char %s_[] = {\n ' % name
+ cc_text += 'static const uint8_t %s_[] = {\n ' % name
lineCounter = 0
for byte in tar_archive:
cc_text += r" '\x%02x'," % ord(byte)
@@ -57,7 +68,7 @@ def writeCCFile(output_file,
cc_text += '\n '
cc_text += '};\n'
cc_text += '\nunsigned int %s_len = %d;\n' % (name, len(tar_archive))
- cc_text += '\nconst char* %s = %s_;\n' % (name, name)
+ cc_text += '\nconst uint8_t* %s = %s_;\n' % (name, name)
if inner_namespace != None:
cc_text += '} // namespace %s\n' % inner_namespace
cc_text += '} // namespace %s\n' % outer_namespace
« no previous file with comments | « runtime/observatory/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698