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
|
@ -73,14 +73,6 @@ machine-mac-large: &machine-mac-large
|
|||
xcode: "10.3.0"
|
||||
|
||||
# Build configurations options.
|
||||
env-debug-build: &env-debug-build
|
||||
GN_CONFIG: //electron/build/args/debug.gn
|
||||
SKIP_DIST_ZIP: '1'
|
||||
|
||||
env-mac-debug-build: &env-mac-debug-build
|
||||
# Set symbol level to 1 so that debug builds do not run out of disk space
|
||||
GN_BUILDFLAG_ARGS: 'symbol_level = 1'
|
||||
|
||||
env-testing-build: &env-testing-build
|
||||
GN_CONFIG: //electron/build/args/testing.gn
|
||||
CHECK_DIST_MANIFEST: '1'
|
||||
|
@ -1339,23 +1331,6 @@ jobs:
|
|||
<<: *steps-checkout-and-save-cache
|
||||
|
||||
# Layer 2: Builds.
|
||||
linux-x64-debug:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
<<: *env-linux-2xlarge
|
||||
<<: *env-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
<<: *steps-electron-build-with-inline-checkout-for-tests
|
||||
|
||||
linux-x64-debug-gn-check:
|
||||
<<: *machine-linux-medium
|
||||
environment:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-debug-build
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
linux-x64-testing:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
|
@ -1413,17 +1388,6 @@ jobs:
|
|||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
<<: *steps-electron-build-for-publish
|
||||
|
||||
linux-ia32-debug:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
<<: *env-linux-2xlarge
|
||||
<<: *env-ia32
|
||||
<<: *env-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
<<: *steps-electron-build-with-inline-checkout-for-tests
|
||||
|
||||
linux-ia32-testing:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
|
@ -1467,17 +1431,6 @@ jobs:
|
|||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
<<: *steps-electron-build-for-publish
|
||||
|
||||
linux-arm-debug:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
<<: *env-linux-2xlarge
|
||||
<<: *env-arm
|
||||
<<: *env-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
<<: *steps-electron-build-with-inline-checkout-for-tests
|
||||
|
||||
linux-arm-testing:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
|
@ -1522,25 +1475,6 @@ jobs:
|
|||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
<<: *steps-electron-build-for-publish
|
||||
|
||||
linux-arm64-debug:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
<<: *env-linux-2xlarge
|
||||
<<: *env-arm64
|
||||
<<: *env-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
<<: *steps-electron-build-with-inline-checkout-for-tests
|
||||
|
||||
linux-arm64-debug-gn-check:
|
||||
<<: *machine-linux-medium
|
||||
environment:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-arm64
|
||||
<<: *env-debug-build
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
linux-arm64-testing:
|
||||
<<: *machine-linux-2xlarge
|
||||
environment:
|
||||
|
@ -1602,23 +1536,6 @@ jobs:
|
|||
<<: *env-ninja-status
|
||||
<<: *steps-electron-build
|
||||
|
||||
osx-debug:
|
||||
<<: *machine-mac-large
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-debug-build
|
||||
<<: *env-mac-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
<<: *steps-electron-build
|
||||
|
||||
osx-debug-gn-check:
|
||||
<<: *machine-mac
|
||||
environment:
|
||||
<<: *env-machine-mac
|
||||
<<: *env-debug-build
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
osx-testing-gn-check:
|
||||
<<: *machine-mac
|
||||
environment:
|
||||
|
@ -1664,25 +1581,6 @@ jobs:
|
|||
<<: *env-ninja-status
|
||||
<<: *steps-electron-build
|
||||
|
||||
mas-debug:
|
||||
<<: *machine-mac-large
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-mas
|
||||
<<: *env-debug-build
|
||||
<<: *env-mac-debug-build
|
||||
<<: *env-enable-sccache
|
||||
<<: *env-ninja-status
|
||||
<<: *steps-electron-build
|
||||
|
||||
mas-debug-gn-check:
|
||||
<<: *machine-mac
|
||||
environment:
|
||||
<<: *env-machine-mac
|
||||
<<: *env-mas
|
||||
<<: *env-debug-build
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
mas-testing-gn-check:
|
||||
<<: *machine-mac
|
||||
environment:
|
||||
|
@ -2030,10 +1928,6 @@ workflows:
|
|||
- linux-checkout-fast
|
||||
- linux-checkout-and-save-cache
|
||||
|
||||
- linux-x64-debug
|
||||
- linux-x64-debug-gn-check:
|
||||
requires:
|
||||
- linux-checkout-fast
|
||||
- linux-x64-testing
|
||||
- linux-x64-testing-no-run-as-node
|
||||
- linux-x64-testing-gn-check:
|
||||
|
@ -2049,7 +1943,6 @@ workflows:
|
|||
requires:
|
||||
- linux-x64-testing
|
||||
|
||||
- linux-ia32-debug
|
||||
- linux-ia32-testing
|
||||
- linux-ia32-testing-tests:
|
||||
requires:
|
||||
|
@ -2061,13 +1954,8 @@ workflows:
|
|||
requires:
|
||||
- linux-ia32-testing
|
||||
|
||||
- linux-arm-debug
|
||||
- linux-arm-testing
|
||||
|
||||
- linux-arm64-debug
|
||||
- linux-arm64-debug-gn-check:
|
||||
requires:
|
||||
- linux-checkout-fast
|
||||
- linux-arm64-testing
|
||||
- linux-arm64-testing-gn-check:
|
||||
requires:
|
||||
|
@ -2084,14 +1972,6 @@ workflows:
|
|||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- osx-debug:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- osx-debug-gn-check:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- osx-testing-gn-check:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
@ -2104,14 +1984,6 @@ workflows:
|
|||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- mas-debug:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- mas-debug-gn-check:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
||||
- mas-testing-gn-check:
|
||||
requires:
|
||||
- mac-checkout-fast
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# The config expects the following environment variables to be set:
|
||||
# - "GN_CONFIG" Build type. One of {'debug', 'testing', 'release'}.
|
||||
# - "GN_CONFIG" Build type. One of {'testing', 'release'}.
|
||||
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
|
||||
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
|
||||
# https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
import("all.gn")
|
||||
is_debug = true
|
||||
is_component_build = true
|
||||
|
||||
# This may be guarded behind is_chrome_branded alongside
|
||||
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
|
||||
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.
|
||||
# The initialization of the decoder depends on whether ffmpeg has
|
||||
# been built with H.264 support.
|
||||
rtc_use_h264 = proprietary_codecs
|
|
@ -125,5 +125,5 @@ the `electron` command to use the specified build of Electron instead of
|
|||
the one downloaded by `npm install`. Usage:
|
||||
|
||||
```sh
|
||||
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Debug
|
||||
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Testing
|
||||
```
|
||||
|
|
|
@ -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'
|
||||
```
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ And to cross-compile for `arm` or `ia32` targets, you should pass the
|
|||
`target_cpu` parameter to `gn gen`:
|
||||
|
||||
```sh
|
||||
$ gn gen out/Debug --args='import(...) target_cpu="arm"'
|
||||
$ gn gen out/Testing --args='import(...) target_cpu="arm"'
|
||||
```
|
||||
|
||||
## Building
|
||||
|
@ -114,7 +114,7 @@ GN args.
|
|||
For example if you installed `clang` under `/usr/local/bin/clang`:
|
||||
|
||||
```sh
|
||||
$ gn gen out/Debug --args='import("//electron/build/args/debug.gn") clang_base_path = "/usr/local/bin"'
|
||||
$ gn gen out/Testing --args='import("//electron/build/args/testing.gn") clang_base_path = "/usr/local/bin"'
|
||||
```
|
||||
|
||||
### Using compilers other than `clang`
|
||||
|
|
|
@ -74,7 +74,7 @@ To generate a Visual Studio project, you can pass the `--ide=vs2017` parameter
|
|||
to `gn gen`:
|
||||
|
||||
```powershell
|
||||
$ gn gen out/Debug --ide=vs2017
|
||||
$ gn gen out/Testing --ide=vs2017
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
|
|
@ -36,7 +36,7 @@ To start a debugging session, open up PowerShell/CMD and execute your debug
|
|||
build of Electron, using the application to open as a parameter.
|
||||
|
||||
```powershell
|
||||
$ ./out/Debug/electron.exe ~/my-electron-app/
|
||||
$ ./out/Testing/electron.exe ~/my-electron-app/
|
||||
```
|
||||
|
||||
### Setting Breakpoints
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
### Generate xcode project for debugging sources (cannot build code from xcode)
|
||||
Run `gn gen` with the --ide=xcode argument.
|
||||
```sh
|
||||
$ gn gen out/Debug --ide=xcode
|
||||
$ gn gen out/Testing --ide=xcode
|
||||
```
|
||||
This will generate the electron.ninja.xcworkspace. You will have to open this workspace
|
||||
to set breakpoints and inspect.
|
||||
|
|
|
@ -25,13 +25,13 @@ you prefer a graphical interface.
|
|||
|
||||
## Attaching to and Debugging Electron
|
||||
|
||||
To start a debugging session, open up Terminal and start `lldb`, passing a debug
|
||||
To start a debugging session, open up Terminal and start `lldb`, passing a non-release
|
||||
build of Electron as a parameter.
|
||||
|
||||
```sh
|
||||
$ lldb ./out/Debug/Electron.app
|
||||
(lldb) target create "./out/Debug/Electron.app"
|
||||
Current executable set to './out/Debug/Electron.app' (x86_64).
|
||||
$ lldb ./out/Testing/Electron.app
|
||||
(lldb) target create "./out/Testing/Electron.app"
|
||||
Current executable set to './out/Testing/Electron.app' (x86_64).
|
||||
```
|
||||
|
||||
### Setting Breakpoints
|
||||
|
@ -62,7 +62,7 @@ The app will immediately be paused, since Electron sets the app's name on launch
|
|||
|
||||
```sh
|
||||
(lldb) run
|
||||
Process 25244 launched: '/Users/fr/Code/electron/out/Debug/Electron.app/Contents/MacOS/Electron' (x86_64)
|
||||
Process 25244 launched: '/Users/fr/Code/electron/out/Testing/Electron.app/Contents/MacOS/Electron' (x86_64)
|
||||
Process 25244 stopped
|
||||
* thread #1: tid = 0x839a4c, 0x0000000100162db4 Electron Framework`atom::Browser::SetName(this=0x0000000108b14f20, name="Electron") + 20 at browser.cc:118, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
|
||||
frame #0: 0x0000000100162db4 Electron Framework`atom::Browser::SetName(this=0x0000000108b14f20, name="Electron") + 20 at browser.cc:118
|
||||
|
|
Loading…
Add table
Reference in a new issue