docs: Cross compilation

This commit is contained in:
Cheng Zhao 2015-07-02 15:54:14 +08:00
parent 2078e5736e
commit a367934b95

View file

@ -23,13 +23,11 @@ $ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
Other distributions may offer similar packages for installation via package Other distributions may offer similar packages for installation via package
managers such as yum. Or one can compile from source code. managers such as yum. Or one can compile from source code.
## If You Use Virtual Machines For Building ## If You Use Virtual Machines For Building
If you plan to build electron on a virtual machine, you will need a fixed-size If you plan to build electron on a virtual machine, you will need a fixed-size
device container of at least 25 gigabytes in size. device container of at least 25 gigabytes in size.
## Getting the code ## Getting the code
```bash ```bash
@ -48,6 +46,15 @@ $ cd electron
$ ./script/bootstrap.py -v $ ./script/bootstrap.py -v
``` ```
### Cross compilation
If you want to cross compile for `arm` or `ia32` targets, you can pass the
`--target_arch` parameter to the `bootstrap.py` script:
```bash
$ ./script/bootstrap.py -v --target_arch=arm
```
## Building ## Building
If you would like to build both `Release` and `Debug` targets: If you would like to build both `Release` and `Debug` targets:
@ -75,20 +82,16 @@ You can also build the `Debug` target only:
$ ./script/build.py -c D $ ./script/build.py -c D
``` ```
After building is done, you can find the `electron` debug binary After building is done, you can find the `electron` debug binary under `out/D`.
under `out/D`.
## Cleaning ## Cleaning
To clean the build files: To clean the build files:
```bash ```bash
$ ./script/clean.py $ ./script/clean.py
``` ```
## Troubleshooting ## Troubleshooting
Make sure you have installed all the build dependencies. Make sure you have installed all the build dependencies.