Index: tools/precompilation/test_linux.sh |
diff --git a/tools/precompilation/test_linux.sh b/tools/precompilation/test_linux.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..14f7fa47e9f2e0185df2c331d8f88d232071d5cc |
--- /dev/null |
+++ b/tools/precompilation/test_linux.sh |
@@ -0,0 +1,17 @@ |
+#!/bin/bash -ex |
+ |
+# Usage: |
+# cd sdk |
+# ./tools/precompilation/test_linux.sh |
+ |
+./tools/build.py -mdebug -ax64 runtime |
+ |
+./out/DebugX64/dart_no_snapshot --gen-precompiled-snapshot ~/hello.dart |
+ |
+./out/DebugX64/dart ./tools/precompilation/create_instructions_snapshot_assembly.dart precompiled.instructions precompiled.S |
+ |
+gcc -m64 -c -o precompiled.o precompiled.S |
+ |
+gcc -m64 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.o |
+ |
+LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" gdb -ex run --args ./out/DebugX64/dart --run-precompiled-snapshot not_used.dart |