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

Introduce --ignore_compile_failure to build script #1205

Merged
merged 1 commit into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const Config = function () {
this.channel = ''
this.sccache = getNPMConfig(['sccache'])
this.braveReferralsApiKey = getNPMConfig(['brave_referrals_api_key']) || ''
this.ignore_compile_failure = false
}

Config.prototype.buildArgs = function () {
Expand Down Expand Up @@ -262,6 +263,9 @@ Config.prototype.update = function (options) {
if (options.gclient_verbose)
this.gClientVerbose = options.gclient_verbose

if (options.ignore_compile_failure)
this.ignore_compile_failure = true

this.projectNames.forEach((projectName) => {
// don't update refs for projects that have them
let project = this.projects[projectName]
Expand Down
6 changes: 5 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,13 @@ const util = {

if (process.platform === 'win32') util.updateOmahaMidlFiles()

let num_compile_failure = 1
if (config.ignore_compile_failure)
num_compile_failure = 1000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we want to allow more than 1k? I'm thinking chromium rebase sometimes might surpass since 1 real error can be much more. Merging in any case though.


const args = util.buildArgsToString(config.buildArgs())
util.run('gn', ['gen', config.outputDir, '--args="' + args + '"'], options)
util.run('ninja', ['-C', config.outputDir, config.buildTarget], options)
util.run('ninja', ['-C', config.outputDir, config.buildTarget, '-k', num_compile_failure], options)
},

submoduleSync: (options = {}) => {
Expand Down
1 change: 1 addition & 0 deletions scripts/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ program
.option('--brave_google_api_key <brave_google_api_key>')
.option('--brave_google_api_endpoint <brave_google_api_endpoint>')
.option('--channel <target_chanel>', 'target channel to build', /^(beta|dev|nightly|release)$/i, 'release')
.option('--ignore_compile_failure', 'Keep compiling regardless of error')
.arguments('[build_config]')
.action(build)

Expand Down