[docs] Update references to IA32.
Change-Id: Ifdd2e4126b82e4e7dd18dc736ad5fbbb9ad50101 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435242 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Brian Quinlan <bquinlan@google.com>
@@ -2,18 +2,17 @@
|
||||
|
||||
The Dart VM runs on a variety of ARM processors on Linux and Android. This document explains how to build the Dart VM and SDK to target these platforms.
|
||||
|
||||
> **Note**: You must follow the steps in [Building.md](https://github.com/dart-lang/sdk/blob/main/docs/Building.md) to set up the environment and properly fetch the source code. Cloning the repository or obtaining the source code through other means will not result in a successful build.
|
||||
> **Note**: You must follow the steps in [Building.md](Building.md) to set up the environment and properly fetch the source code. Cloning the repository or obtaining the source code through other means will not result in a successful build.
|
||||
|
||||
# Cross-compiling
|
||||
|
||||
The build scripts download a Clang toolchain that can target IA32, X64, ARM, ARM64 or RISCV64 and run on an X64 or ARM64 host. For these cases, you do not need to install a cross-compiler yourself. For other cases, like building on a RISCV64 host or targeting RISCV32, you will need to manually install a toolchain.
|
||||
The build scripts download a Clang toolchain that can target X64, ARM, ARM64 or RISCV64 and run on an X64 or ARM64 host. For these cases, you do not need to install a cross-compiler yourself. For other cases, like building on a RISCV64 host or targeting RISCV32, you will need to manually install a toolchain.
|
||||
|
||||
## Linux
|
||||
|
||||
If you are running Debian/Ubuntu, you can obtain a cross-compiler by doing the following:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install g++-i686-linux-gnu # To target ia32
|
||||
$ sudo apt-get install g++-x86-64-linux-gnu # To target x64
|
||||
$ sudo apt-get install g++-arm-linux-gnueabihf # To target arm
|
||||
$ sudo apt-get install g++-aarch64-linux-gnu # To target arm64
|
||||
@@ -36,7 +35,7 @@ $ ./tools/build.py --no-clang --mode release --arch arm64 create_sdk
|
||||
$ ./tools/build.py --no-clang --mode release --arch riscv64 create_sdk
|
||||
```
|
||||
|
||||
You can also produce only a Dart VM runtime, no SDK, by replacing `create_sdk` with `runtime`. This process involves also building a VM that targets ia32/x64, which is used to generate a few parts of the SDK.
|
||||
You can also produce only a Dart VM runtime, no SDK, by replacing `create_sdk` with `runtime`. This process involves also building a VM that targets x64, which is used to generate a few parts of the SDK.
|
||||
|
||||
You can use a different toolchain using the -t switch. For example, if the path to your gcc is /path/to/toolchain/prefix-gcc, then you'd invoke the build script with:
|
||||
|
||||
@@ -63,7 +62,7 @@ You can create Debian packages targeting ARM or RISC-V as follows:
|
||||
|
||||
```
|
||||
$ ./tools/linux_dist_support/create_tarball.py
|
||||
$ ./tools/linux_dist_support/create_debian_packages.py -a {ia32, x64, arm, arm64, riscv64}
|
||||
$ ./tools/linux_dist_support/create_debian_packages.py -a {x64, arm, arm64, riscv64}
|
||||
```
|
||||
|
||||
# Testing
|
||||
|
||||
@@ -30,7 +30,7 @@ Run gclient sync to install the Android NDK and SDK. This may take 10 minutes or
|
||||
|
||||
Once you've set up your build tree, you can build the Dart VM for Android by using the standard Dart build script with the addition of the --os android build flag:
|
||||
|
||||
`$ tools/build.py --arch=arm,arm64,ia32,x64,riscv64 --os=android runtime`
|
||||
`$ tools/build.py --arch=arm,arm64,x64,riscv64 --os=android runtime`
|
||||
|
||||
# Testing the result
|
||||
|
||||
@@ -58,7 +58,7 @@ Create a directory on the Android emulator.
|
||||
|
||||
Copy the Dart VM executable to the Android emulator:
|
||||
|
||||
`$ adb push out/android/ReleaseAndroid{ARM,ARM64,IA32,X64,RISCV64}/dart /data/local/tmp/dart/dart`
|
||||
`$ adb push out/android/ReleaseAndroid{ARM,ARM64,X64,RISCV64}/dart /data/local/tmp/dart/dart`
|
||||
|
||||
Create a simple Dart test script:
|
||||
|
||||
|
||||
@@ -99,30 +99,21 @@ Note: If you do not have emscripten, you can update your `.gclient` file to pull
|
||||
|
||||
**IMPORTANT: You must follow instructions for [Getting the source](#source) before attempting to build. Just cloning a GitHub repo or downloading and unpacking a ZIP of the SDK repository would not work.**
|
||||
|
||||
Build the 64-bit SDK:
|
||||
Build the SDK:
|
||||
|
||||
```bash
|
||||
# From within the "dart-sdk" directory.
|
||||
cd sdk
|
||||
./tools/build.py --mode release --arch x64 create_sdk
|
||||
./tools/build.py --mode release create_sdk
|
||||
```
|
||||
|
||||
The output will be in `out/ReleaseX64/dart-sdk` on Linux and Windows, and `xcodebuild/ReleaseX64/dart-sdk` on macOS.
|
||||
|
||||
Build the 32-bit SDK:
|
||||
|
||||
```bash
|
||||
# From within the "dart-sdk" directory.
|
||||
cd sdk
|
||||
./tools/build.py --mode release --arch ia32 create_sdk
|
||||
```
|
||||
The output will be in `out/ReleaseIA32/dart-sdk` on Linux and Windows, or `xcodebuild/ReleaseIA32/dart-sdk` on macOS.
|
||||
|
||||
See also [Building Dart SDK for ARM or RISC-V](Building-Dart-SDK-for-ARM-or-RISC-V.md).
|
||||
|
||||
## Tips
|
||||
|
||||
By default the build and test scripts select the debug binaries. You can build and test the release version of the VM by specifying `--mode=release` or both debug and release by specifying `--mode=all` on the respective `build.py` and `test.py` command lines. This can be shortened to `-mrelease` or `-m release`, and the architecture can be specified with `--arch=x64` or `-a x64`, the default. Other architectures, like `ia32`, `arm`, and `arm64` are also supported.
|
||||
By default the build and test scripts select the debug binaries. You can build and test the release version of the VM by specifying `--mode=release` or both debug and release by specifying `--mode=all` on the respective `build.py` and `test.py` command lines. This can be shortened to `-mrelease` or `-m release`, and the architecture can be specified with `--arch=x64` or `-a x64`, the default. Other architectures, like `arm`, `arm64` and `riscv64` are also supported.
|
||||
|
||||
We recommend that you use a local file system at least for the output of the builds. The output directory is `out` on linux, `xcodebuild` on macOS, and `build` on Windows. If your code is in some NFS partition, you can link the `out` directory to a local directory:
|
||||
```bash
|
||||
@@ -155,22 +146,22 @@ gclient runhooks
|
||||
|
||||
All tests are executed using the `test.py` script under `tools/`. You need to use `build.py` to build the `most` and `run_ffi_unit_tests` targets before testing, e.g.
|
||||
```bash
|
||||
$ ./tools/build.py --mode release --arch ia32 most run_ffi_unit_tests
|
||||
$ ./tools/build.py --mode release most run_ffi_unit_tests
|
||||
```
|
||||
|
||||
Now you can run all tests as follows (Safari, Firefox, and Chrome must be installed, if you want to run the tests on them):
|
||||
```bash
|
||||
$ ./tools/test.py -mrelease --arch=ia32 --compiler=dartk,dart2js --runtime=vm,d8,chrome,firefox,[safari]
|
||||
$ ./tools/test.py -mrelease --compiler=dartk,dart2js --runtime=vm,d8,chrome,firefox,[safari]
|
||||
```
|
||||
Specify the compiler used (optional -- only necessary if you are compiling to JavaScript (required for most browsers), the default is "none") and a runtime (where the code will be run).
|
||||
|
||||
You can run a specific test by specifying its full name or a prefix. For instance, the following runs only tests from the core libraries:
|
||||
```bash
|
||||
$ ./tools/test.py -mrelease --arch=ia32 --runtime=vm corelib
|
||||
$ ./tools/test.py -mrelease --runtime=vm corelib
|
||||
```
|
||||
The following runs a single test:
|
||||
```bash
|
||||
$ ./tools/test.py -mrelease --arch=ia32 --runtime=vm corelib/ListTest
|
||||
$ ./tools/test.py -mrelease --runtime=vm corelib/ListTest
|
||||
```
|
||||
|
||||
Make sure to run tests using the release VM if you have built the release VM, and for the same architecture as you have built.
|
||||
@@ -235,7 +226,7 @@ Some common problems you might get when running tests for the first time:
|
||||
* Use `xvfb`:
|
||||
|
||||
```bash
|
||||
xvfb-run ./tools/test.py --arch=ia32 --compiler=dart2js --runtime=drt ...
|
||||
xvfb-run ./tools/test.py --compiler=dart2js --runtime=drt ...
|
||||
```
|
||||
|
||||
* Other options include using ssh X tunneling (`ssh -Y`), NX, VNC, setting up `xhost` and exporting the DISPLAY environment variable, or simply running tests locally.
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
> [!IMPORTANT]
|
||||
> This page was copied from https://github.com/dart-lang/sdk/wiki and needs review.
|
||||
> Please [contribute](../CONTRIBUTING.md) changes to bring it up-to-date -
|
||||
> removing this header - or send a CL to delete the file.
|
||||
|
||||
---
|
||||
|
||||
| Operating System | JIT | AOT |
|
||||
| ------------- | ------------- | ----- |
|
||||
| Android | ia32, x64, armv7, armv8, rv64gc | x64, armv7, armv8, rv64gc |
|
||||
| Fuchsia | x64, armv8, rv64gc | x64, armv8, rv64gc |
|
||||
| iOS | armv7, armv8 | armv7, armv8 |
|
||||
| Linux | ia32, x64, armv7, armv8, rv32gc, rv64gc | x64, armv7, armv8, rv32gc, rv64gc |
|
||||
| macOS | x64, armv8 | x64, armv8 |
|
||||
| Windows | ia32, x64, armv8 | x64, armv8 |
|
||||
|
||||
Past versions of the Dart VM also supported mipsel, armv6 and armv5te.
|
||||
@@ -1,11 +1,6 @@
|
||||
> [!IMPORTANT]
|
||||
> This page was copied from https://github.com/dart-lang/sdk/wiki and needs review.
|
||||
> Please [contribute](../CONTRIBUTING.md) changes to bring it up-to-date -
|
||||
> removing this header - or send a CL to delete the file.
|
||||
# Heap snapshots
|
||||
|
||||
---
|
||||
|
||||
The [VM service protocol](https://github.com/dart-lang/sdk/blob/main/runtime/vm/service/service.md) provides access to _heap snapshots_, a description of all the objects and references in the heap at some point in time. Tools such as Observatory provide analysis and visualization of these snapshots to help developers understand the memory usage of their applications.
|
||||
The [VM service protocol](../vm/service/service.md) provides access to _heap snapshots_, a description of all the objects and references in the heap at some point in time. Tools such as Observatory provide analysis and visualization of these snapshots to help developers understand the memory usage of their applications.
|
||||
|
||||
* [Concepts](#concepts)
|
||||
* [Advice](#concepts)
|
||||
@@ -1,10 +1,3 @@
|
||||
> [!IMPORTANT]
|
||||
> This page was copied from https://github.com/dart-lang/sdk/wiki and needs review.
|
||||
> Please [contribute](../CONTRIBUTING.md) changes to bring it up-to-date -
|
||||
> removing this header - or send a CL to delete the file.
|
||||
|
||||
---
|
||||
|
||||
# Live program changes in the Dart VM ("Hot reload")
|
||||
|
||||
The Dart VM can apply changes to a running (live) program, which it calls _hot reload_. The semantics are very close to those of Smalltalk, which doesn't have a name for this feature since in most Smalltalk implementations program changes can only be made in a live programming environment.
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
@@ -0,0 +1,12 @@
|
||||
# Supported architectures
|
||||
|
||||
| Operating System | Architectures |
|
||||
| ------------- | ------------- | ----- |
|
||||
| Android | x64, armv7, armv8, rv64gc |
|
||||
| Fuchsia | x64, armv8, rv64gc |
|
||||
| iOS | armv7, armv8 |
|
||||
| Linux | x64, armv7, armv8, rv32gc, rv64gc |
|
||||
| macOS | x64, armv8 |
|
||||
| Windows | x64, armv8 |
|
||||
|
||||
Past versions of the Dart VM also supported mipsel, armv6, armv5te and ia32.
|
||||