Skip to content

Commit

Permalink
[iOS] Always pass in target environment to build command
Browse files Browse the repository at this point in the history
Chromium 133 makes passing in this gn arg required
  • Loading branch information
kylehickinson committed Jan 24, 2025
1 parent b0fac5e commit 8b9e6bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion build/commands/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ Object.defineProperty(Config.prototype, 'outputDir', {
if (this.targetOS && this.targetOS !== this.hostOS) {
buildConfigDir = this.targetOS + '_' + buildConfigDir
}
if (this.targetEnvironment) {
if (this.targetEnvironment && this.targetEnvironment != 'device') {
buildConfigDir = buildConfigDir + "_" + this.targetEnvironment
}
if (this.isChromium) {
Expand Down
21 changes: 6 additions & 15 deletions ios/brave-ios/scripts/scheme_preaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def main():
target_arch = 'arm64' if platform.processor(
) == 'arm' or options.platform_name == 'iphoneos' else 'x64'
target_environment = 'simulator' if (options.platform_name
== 'iphonesimulator') else None
== 'iphonesimulator') else 'device'

if options.only_update_symlink:
# If we're choosing to only update the symlink we should validate
Expand Down Expand Up @@ -79,28 +79,19 @@ def UpdateSymlink(config, target_arch, target_environment):
cmd_args = [
'npm', 'run', 'update_symlink', '--', config, '--symlink_dir',
os.path.join(src_dir, 'out/ios_current_link'), '--target_os', 'ios',
'--target_arch', target_arch
'--target_arch', target_arch, '--target_environment',
target_environment
]
if target_environment != None:
cmd_args += ['--target_environment', target_environment]
CallNpm(cmd_args)


def BuildCore(config, target_arch, target_environment):
"""Generates and builds the BraveCore.framework"""
cmd_args = [
'npm',
'run',
'build',
'--',
config,
'--target_os',
'ios',
'--target_arch',
target_arch,
'npm', 'run', 'build', '--', config, '--target_os', 'ios',
'--target_arch', target_arch, '--target_environment',
target_environment
]
if target_environment != None:
cmd_args += ['--target_environment', target_environment]
CallNpm(cmd_args)


Expand Down

0 comments on commit 8b9e6bc

Please sign in to comment.