add official build settings and option for debug symbols in release builds
add sccache config auditors @bbondy @bsclifton
This commit is contained in:
@@ -27,6 +27,8 @@ const Config = function () {
|
||||
this.gClientFile = process.env.MUON_GCLIENT_FILE || this.defaultGClientFile
|
||||
this.targetArch = 'x64'
|
||||
this.gypTargetArch = 'x64'
|
||||
this.officalBuild = false
|
||||
this.debugBuild = JSON.parse(getNPMConfig(['muon_debug_build']) || false)
|
||||
this.googleApiKey = getNPMConfig(['electron_google_api_key']) || 'AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q'
|
||||
this.googleApiEndpoint = getNPMConfig(['electron_google_api_endpoint']) || 'https://www.googleapis.com/geolocation/v1/geolocate?key='
|
||||
this.buildProjects()
|
||||
@@ -38,7 +40,7 @@ Config.prototype.buildArgs = function () {
|
||||
const version = this.electronVersion
|
||||
const version_parts = version.split('.')
|
||||
|
||||
return {
|
||||
let args = {
|
||||
root_extra_deps: [ "//electron" ],
|
||||
muon_build: true,
|
||||
is_component_build: this.buildConfig !== 'Release',
|
||||
@@ -48,7 +50,6 @@ Config.prototype.buildArgs = function () {
|
||||
clang_use_chrome_plugins: false,
|
||||
enable_print_preview: false,
|
||||
enable_plugin_installation: false,
|
||||
// enable_stripping: false,
|
||||
enable_supervised_users: false,
|
||||
branding_path_component: "brave",
|
||||
enable_widevine: process.platform !== 'linux',
|
||||
@@ -64,6 +65,20 @@ Config.prototype.buildArgs = function () {
|
||||
electron_version_minor: version_parts[1],
|
||||
electron_version_build: version_parts[2],
|
||||
}
|
||||
|
||||
if (this.debugBuild && !this.officalBuild) {
|
||||
args.enable_stripping = false
|
||||
args.symbol_level = 2
|
||||
args.enable_profiling = true
|
||||
args.is_win_fastlink = true
|
||||
}
|
||||
|
||||
let sccache = getNPMConfig(['sccache'])
|
||||
if (sccache) {
|
||||
args.cc_wrapper = sccache
|
||||
}
|
||||
|
||||
return args
|
||||
}
|
||||
|
||||
Config.prototype.appendPath = function (oldPath, addPath) {
|
||||
@@ -124,6 +139,17 @@ Config.prototype.update = function (options) {
|
||||
this.googleApiEndpoint = options.electron_google_api_endpoint
|
||||
}
|
||||
|
||||
if (typeof options.debug_build === 'boolean') {
|
||||
this.debugBuild = options.debug_build
|
||||
}
|
||||
|
||||
if (typeof options.official_build === 'boolean') {
|
||||
this.officalBuild = options.official_build
|
||||
if (this.officalBuild) {
|
||||
this.debugBuild = false
|
||||
}
|
||||
}
|
||||
|
||||
this.projectNames.forEach((projectName) => {
|
||||
// don't update refs for projects that have them
|
||||
if (!this.projects[projectName].ref)
|
||||
|
||||
@@ -20,6 +20,8 @@ program
|
||||
.option('--node', 'build node')
|
||||
.option('--chromedriver', 'build chromedriver')
|
||||
.option('--target_arch <target_arch>', 'target architecture', 'x64')
|
||||
.option('--debug_build <debug_build>', 'keep debugging symbols')
|
||||
.option('--official_build <official_build>', 'force official build settings')
|
||||
.option('--electron_google_api_key <electron_google_api_key>')
|
||||
.option('--electron_google_api_endpoint <electron_google_api_endpoint>')
|
||||
.option('--no_branding_update', 'don\'t copy BRANDING to the chrome theme dir')
|
||||
@@ -57,6 +59,7 @@ program
|
||||
.command('cibuild')
|
||||
.option('--target_arch <target_arch>', 'target architecture', 'x64')
|
||||
.action((options) => {
|
||||
options.official_build = true
|
||||
build('Release', options)
|
||||
createDist(options)
|
||||
upload(options)
|
||||
|
||||
Reference in New Issue
Block a user