build: remove debug builds (#21016)
* build: remove debug builds * Update docs/development/debugging-instructions-macos.md Co-Authored-By: Robo <hop2deep@gmail.com>
This commit is contained in:
parent
f1e7393e30
commit
b06a479240
10 changed files with 30 additions and 168 deletions
|
@ -96,30 +96,30 @@ $ cd src
|
|||
$ export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
|
||||
# this next line is needed only if building with sccache
|
||||
$ export GN_EXTRA_ARGS="${GN_EXTRA_ARGS} cc_wrapper=\"${PWD}/electron/external_binaries/sccache\""
|
||||
$ gn gen out/Debug --args="import(\"//electron/build/args/debug.gn\") $GN_EXTRA_ARGS"
|
||||
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") $GN_EXTRA_ARGS"
|
||||
```
|
||||
|
||||
Or on Windows (without the optional argument):
|
||||
```sh
|
||||
$ cd src
|
||||
$ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools
|
||||
$ gn gen out/Debug --args="import(\"//electron/build/args/debug.gn\")"
|
||||
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
|
||||
```
|
||||
|
||||
This will generate a build directory `out/Debug` under `src/` with
|
||||
debug build configuration. You can replace `Debug` with another name,
|
||||
This will generate a build directory `out/Testing` under `src/` with
|
||||
the testing build configuration. You can replace `Testing` with another name,
|
||||
but it should be a subdirectory of `out`.
|
||||
Also you shouldn't have to run `gn gen` again—if you want to change the
|
||||
build arguments, you can run `gn args out/Debug` to bring up an editor.
|
||||
build arguments, you can run `gn args out/Testing` to bring up an editor.
|
||||
|
||||
To see the list of available build configuration options, run `gn args
|
||||
out/Debug --list`.
|
||||
out/Testing --list`.
|
||||
|
||||
**For generating Debug (aka "component" or "shared") build config of
|
||||
**For generating Testing build config of
|
||||
Electron:**
|
||||
|
||||
```sh
|
||||
$ gn gen out/Debug --args="import(\"//electron/build/args/debug.gn\") $GN_EXTRA_ARGS"
|
||||
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") $GN_EXTRA_ARGS"
|
||||
```
|
||||
|
||||
**For generating Release (aka "non-component" or "static") build config of
|
||||
|
@ -132,9 +132,9 @@ $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\") $GN_EX
|
|||
**To build, run `ninja` with the `electron` target:**
|
||||
Nota Bene: This will also take a while and probably heat up your lap.
|
||||
|
||||
For the debug configuration:
|
||||
For the testing configuration:
|
||||
```sh
|
||||
$ ninja -C out/Debug electron
|
||||
$ ninja -C out/Testing electron
|
||||
```
|
||||
|
||||
For the release configuration:
|
||||
|
@ -147,19 +147,19 @@ This will build all of what was previously 'libchromiumcontent' (i.e. the
|
|||
so it will take a while.
|
||||
|
||||
To speed up subsequent builds, you can use [sccache][sccache]. Add the GN arg
|
||||
`cc_wrapper = "sccache"` by running `gn args out/Debug` to bring up an
|
||||
`cc_wrapper = "sccache"` by running `gn args out/Testing` to bring up an
|
||||
editor and adding a line to the end of the file.
|
||||
|
||||
[sccache]: https://github.com/mozilla/sccache
|
||||
|
||||
The built executable will be under `./out/Debug`:
|
||||
The built executable will be under `./out/Testing`:
|
||||
|
||||
```sh
|
||||
$ ./out/Debug/Electron.app/Contents/MacOS/Electron
|
||||
$ ./out/Testing/Electron.app/Contents/MacOS/Electron
|
||||
# or, on Windows
|
||||
$ ./out/Debug/electron.exe
|
||||
$ ./out/Testing/electron.exe
|
||||
# or, on Linux
|
||||
$ ./out/Debug/electron
|
||||
$ ./out/Testing/electron
|
||||
```
|
||||
|
||||
### Packaging
|
||||
|
@ -181,7 +181,7 @@ set the `target_cpu` and `target_os` GN arguments. For example, to compile an
|
|||
x86 target from an x64 host, specify `target_cpu = "x86"` in `gn args`.
|
||||
|
||||
```sh
|
||||
$ gn gen out/Debug-x86 --args='... target_cpu = "x86"'
|
||||
$ gn gen out/Testing-x86 --args='... target_cpu = "x86"'
|
||||
```
|
||||
|
||||
Not all combinations of source and target CPU/OS are supported by Chromium.
|
||||
|
@ -226,7 +226,7 @@ generate build headers for the modules to compile against, run the following
|
|||
under `src/` directory.
|
||||
|
||||
```sh
|
||||
$ ninja -C out/Debug third_party/electron_node:headers
|
||||
$ ninja -C out/Testing third_party/electron_node:headers
|
||||
```
|
||||
|
||||
You can now [run the tests](testing.md#unit-tests).
|
||||
|
@ -235,7 +235,7 @@ If you're debugging something, it can be helpful to pass some extra flags to
|
|||
the Electron binary:
|
||||
|
||||
```sh
|
||||
$ ./out/Debug/Electron.app/Contents/MacOS/Electron electron/spec \
|
||||
$ npm run test -- \
|
||||
--enable-logging -g 'BrowserWindow module'
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue