Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: remove debug builds #21016

Merged
merged 2 commits into from Nov 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
128 changes: 0 additions & 128 deletions .circleci/config.yml
Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -2049,7 +1943,6 @@ workflows:
requires:
- linux-x64-testing

- linux-ia32-debug
- linux-ia32-testing
- linux-ia32-testing-tests:
requires:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
@@ -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
Expand Down
10 changes: 0 additions & 10 deletions build/args/debug.gn

This file was deleted.

2 changes: 1 addition & 1 deletion docs/api/environment-variables.md
Expand Up @@ -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
```
36 changes: 18 additions & 18 deletions docs/development/build-instructions-gn.md
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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).
Expand All @@ -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'
```

Expand Down
4 changes: 2 additions & 2 deletions docs/development/build-instructions-linux.md
Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion docs/development/build-instructions-windows.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/development/debug-instructions-windows.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/development/debugging-instructions-macos-xcode.md
Expand Up @@ -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.
Expand Down