Difference between revisions of "Porting/Chromium/Electron"

From RCS Wiki
Jump to navigation Jump to search
m (add related github electron issue)
m (Forgot to cd src, set envvar)
(One intermediate revision by the same user not shown)
Line 17: Line 17:
 
mkdir electron-gn && cd electron-gn
 
mkdir electron-gn && cd electron-gn
 
gclient config --name "src/electron" --unmanaged https://github.com/shawnanastasio/electron
 
gclient config --name "src/electron" --unmanaged https://github.com/shawnanastasio/electron
 +
gclient sync --with_branch_heads --with_tags
 +
 +
cd src
 +
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
  
 
# Configure the build (debug)
 
# Configure the build (debug)

Revision as of 16:16, 23 January 2019

Electron on ppc64le

The patches from Porting/Chromium can be used to build working binaries of the Electron framework. Upstreaming status: https://github.com/electron/electron/issues/15691

Building

The build process is greatly simplified from Porting/Chromium due to Electron's built-in chromium patching mechanism. User:Shawnanastasio has created a fork of the electron repository that contains all the required patches at https://github.com/shawnanastasio/electron.

Prerequisites

Before building, you will need to set up your build environment. This includes setting the required environment variables, obtaining the dependencies, and building an llvm toolchain. You can follow the first part of the instructions at Porting/Chromium to accomplish this.

Building

The rest of the process closely mirrors the upstream Electron build instructions, but with a few additions.

# Checkout the forked electron code that contains the ppc64le patches
mkdir electron-gn && cd electron-gn
gclient config --name "src/electron" --unmanaged https://github.com/shawnanastasio/electron
gclient sync --with_branch_heads --with_tags

cd src
export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools

# Configure the build (debug)
gn args out/Debug

# PASTE IN EDITOR

import("//electron/build/args/debug.gn")

# disable unsupported features
enable_nacl = false
treat_warnings_as_errors = false

# configure clang toolchain
is_clang = true
clang_base_path = "/path/to/your/llvm_build"
clang_use_chrome_plugins = false

# workaround issue in old v8
use_jumbo_build = false

# END PASTE

# Build electron
ninja -C out/Debug electron