New issue
Advanced search Search tips

Issue 680711 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocking:
issue 723816



Sign in to add a comment

No flag in build configuraiton for iOS to build libraries and apps with bitcode

Reported by vladimir...@gmail.com, Jan 12 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:50.0) Gecko/20100101 Firefox/50.0

Steps to reproduce the problem:
Try to build an application, framework or library for iOS, watchOS, or tvOS, based on Chromium or on some related projects (such as WebRTC). It would be convenient to have an official configuration flag for that.

What is the expected behavior?

What went wrong?
Currently there is no flag available.

Did this work before? No 

Chrome version:   Channel: canary
OS Version: OS X 10.12
Flash Version: 

I will submit a patch to add the configuration flag that enables building with (iOS-specific) bitcode options for clang, as, and ld. Opening this bug is to properly link and track the submission of patch.
 
Sent for code review under https://codereview.chromium.org/2631573002/

Comment 2 by ajha@chromium.org, Jan 13 2017

Labels: TE-NeedsTriageHelp
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0e1f16653bdf3cacd121bfbc1f32b25f01ac6aed

commit 0e1f16653bdf3cacd121bfbc1f32b25f01ac6aed
Author: VladimirTechMan <VladimirTechMan@gmail.com>
Date: Fri Jan 13 12:15:44 2017

Support building libs and apps for iOS, watchOS, and tvOS with bitcode

This patch adds flag "enable_ios_bitcode" to the build configuration
for iOS applications, frameworks, and libraries. It triggers adding
the "-fembed-bitcode" option when compiling and linking parts of the
projects for production builds (is_debug = false), and it triggers
adding the "-fembed-bitcode-marker" option in the case of debug builds.
That is along the lines of how Xcode does it, since the introduction
of the bitcode support and corresponding options.

The option only makes sense for Xcode build tools now and for iOS SDK
compatible builds (iOS, watchOS, tvOS). Thus, it the options is only
applicable when building for iOS with use_xcode_clang = true. And only
when building for real devices (with ARM CPUs). The latter limitation
is due to the usage of Intel assembly syntax and the Yasm tool when
building for iOS simulator (Yasm cannot emit bitcode sections now).
But it does not affect the workflow for the generated applications,
frameworks and libraries at the moment of submitting this patch:
For now, Xcode only cares about the availability of bitcode sections
in _all_ the pre-compiled parts of bitcode-enabled projects when
building those projects for ARM-based devices. Building for iOS
simulator, it handles the projects just fine, with or without bitcode
sections available in the linked libraries. That may change in the
future, of course, but currently it should be fine.

BUG= 680711 

Review-Url: https://codereview.chromium.org/2631573002
Cr-Commit-Position: refs/heads/master@{#443535}

[modify] https://crrev.com/0e1f16653bdf3cacd121bfbc1f32b25f01ac6aed/build/config/ios/BUILD.gn

Comment 4 by caseq@chromium.org, Jan 17 2017

Components: -Platform>DevTools Build
Cc: sdefresne@chromium.org
Labels: -OS-Mac OS-iOS
Status: Untriaged (was: Unconfirmed)
[Mac Triage] Is this fixed? Also changing the OS to iOS.
Cc: -sdefresne@chromium.org justincohen@chromium.org
Owner: sdefresne@chromium.org
Status: Assigned (was: Untriaged)
Status: Fixed (was: Assigned)
Looks like original reporter implemented and landed the support. Thank you!

Comment 9 by mef@chromium.org, May 17 2017

Blocking: 723816

Sign in to add a comment