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

Allows using custom archs in custom_build_options_simulator #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 8 additions & 2 deletions lib/cocoapods-binary/rome/build_framework.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ def build_for_iosish_platform(sandbox,
other_options = []
# bitcode enabled
other_options += ['BITCODE_GENERATION_MODE=bitcode'] if bitcode_enabled
# make less arch to iphone simulator for faster build
custom_build_options_simulator += ['ARCHS=x86_64', 'ONLY_ACTIVE_ARCH=NO'] if simulator == 'iphonesimulator'

# make less arch to iphone simulator for faster build if there is no options in `custom_build_options_simulator`
if simulator == 'iphonesimulator'
joined_options = custom_build_options_simulator.join(' ')
custom_build_options_simulator << 'ONLY_ACTIVE_ARCH=NO' unless joined_options.include?('ONLY_ACTIVE_ARCH')
custom_build_options_simulator << 'ARCHS=x86_64' unless joined_options.include?('ARCHS')
end

is_succeed, _ = xcodebuild(sandbox, target_label, device, deployment_target, other_options + custom_build_options)
exit 1 unless is_succeed
Expand Down Expand Up @@ -110,6 +115,7 @@ def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, other_optio
platform = PLATFORMS[sdk]
args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil?
args += other_options
args.map! { |arg| arg.include?(' ') ? "\'#{arg}\'" : arg }
log = `xcodebuild #{args.join(" ")} 2>&1`
exit_code = $?.exitstatus # Process::Status
is_succeed = (exit_code == 0)
Expand Down