634e5a1d02
BSD systems don't place bash in /bin and a lot of the dart tools hardcode a #!/bin/bash shebang that fails the 'all' target build (not able to execute dart2js since the interpreter is not found). Solve the issue by using #!/usr/bin/env as the shebang. For scripts that need to pass arguments to bash modify the script to use the set command as the first executed line of shell. BUG= R=whesse@google.com Review URL: https://codereview.chromium.org/1552313002 .
16 lines
469 B
Bash
Executable File
16 lines
469 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -ex
|
|
|
|
# Usage:
|
|
# cd sdk
|
|
# ./tools/precompilation/test_linux.sh <dart-script-file>
|
|
|
|
./tools/build.py -mdebug -ax64 runtime
|
|
|
|
./out/DebugX64/dart_no_snapshot --gen-precompiled-snapshot --package-root=out/DebugX64/packages/ "$1"
|
|
|
|
gcc -m64 -shared -Wl,-soname,libprecompiled.so -o libprecompiled.so precompiled.S
|
|
|
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD" gdb -ex run --args ./out/DebugX64/dart_precompiled --run-precompiled-snapshot not_used.dart
|