Граф коммитов

99 Коммитов

Автор SHA1 Сообщение Дата
olivierrobin 04f3802a94 Merge Arrays in plist_util.py
The plist templates can have different values for the same key.
If the value is a list (plist array), merge should be the concatenation.
Don't compute union as as list can contain dicts.

BUG=692552

Review-Url: https://codereview.chromium.org/2715543002
Cr-Original-Commit-Position: refs/heads/master@{#452083}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0cf3dac55d77555df465f3809e8f8636efef303d
2017-02-22 16:43:01 +00:00
ymzhang 28f9559990 [DirectoryOwnership] Add TEAM/COMPONENT into OWNERS files.
We are adding COMPONENT/TEAM information into OWNERS file. Please help us to
verify the added TEAM/COMPONENT or suggest the correct TEAM/COMPONENT in your
OWNERS files. Thanks.

Proposal to add TEAM/COMPONENT information into OWNERS files
http://bit.ly/add-team-component-proposal
Proposal about how to get suggested component for directory.
http://bit.ly/directory-mapping-proposal
TEAM-COMPONENT mapping
http://bit.ly/component-team-mapping

Additional Information:
Component lists
https://bugs.chromium.org/p/chromium/adminComponents

BUG=679905

Review-Url: https://codereview.chromium.org/2707163003
Cr-Original-Commit-Position: refs/heads/master@{#451895}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e63ee2d8631859f96c552a203469b13a3fcceaee
2017-02-22 05:57:37 +00:00
lpromero 265044700f Handle storyboards in GN.
BUG=none
R=sdefresne@chromium.org,rohitrao@chromium.org

Review-Url: https://codereview.chromium.org/2564023002
Cr-Original-Commit-Position: refs/heads/master@{#437779}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 39fe426a5bec5352ddacab96ac10c6c33f9d5ac1
2016-12-10 23:50:32 +00:00
sdefresne 86b55ceb7a Add support for generating PkgInfo for application bundle on iOS.
The generation of PkgInfo is disabled for the moment (as come target
downstream already pack a PkgInfo file and enabling the target would
cause a non-deterministic build) and can be enabled by an undocumented
parameter write_pkg_info.

Update build/config/mac/write_pkg_info.py to support loading plist
in any format, not only xml1.

BUG=672516

Review-Url: https://codereview.chromium.org/2559323005
Cr-Original-Commit-Position: refs/heads/master@{#437551}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8afe7bf6abf4c6c50b9c8f153e4ebf3cb045ef83
2016-12-09 16:08:27 +00:00
justincohen a7254cd34a Correct iOS hermetic plist rule.
BUG=632229

Review-Url: https://codereview.chromium.org/2533613002
Cr-Original-Commit-Position: refs/heads/master@{#435135}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c49104d2d37cd6ad1c876ba8865b976f91a0ed98
2016-11-30 07:47:13 +00:00
kthelgason 9d2f518e7e Reland of move unused build override (patchset #1 id:1 of https://codereview.chromium.org/2520383002/ )
Reason for revert:
Reland after fixing mac builds.

Original issue's description:
> Revert of Remove unused build override (patchset #2 id:20001 of https://codereview.chromium.org/2498603002/ )
>
> Reason for revert:
> This breaks all the Mac builds.
>
> /b/build/slave/ios-simulator/build/src/buildtools/mac/gn gen //out/Debug-iphonesimulator --check
>   -> returned 1
> ERROR at //build/config/mac/mac_sdk.gni:18:27: Undefined identifier
>   mac_deployment_target = mac_deployment_target_build_override
>                           ^-----------------------------------
> See //build/toolchain/mac/BUILD.gn:14:1: whence it was imported.
> import("//build/config/mac/mac_sdk.gni")
> ^--------------------------------------
> See //BUILD.gn:73:1: which caused the file to be included.
> group("gn_all") {
> ^----------------
> GN gen failed: 1
>
> Original issue's description:
> > Remove unused build override
> >
> > The only downstream project using this used to be WebRTC, where it's no
> > longer needed.
> >
> > BUG=webrtc:6431
> > NOTRY=true
> >
> > Committed: https://crrev.com/6dd0024530bfa1d1f88840204633788bad70239e
> > Cr-Commit-Position: refs/heads/master@{#433856}
>
> TBR=dpranke@chromium.org,kjellander@chromium.org,kthelgason@webrtc.org,kthelgason@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6431
>
> Committed: https://crrev.com/5638488a75f3e1424bedc0607e2183b9d0ad8f4a
> Cr-Commit-Position: refs/heads/master@{#433861}

TBR=dpranke@chromium.org,kjellander@chromium.org,kthelgason@webrtc.org,avi@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
BUG=webrtc:6431

Review-Url: https://codereview.chromium.org/2525673002
Cr-Original-Commit-Position: refs/heads/master@{#434157}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e3f40e988d9487bfa030e714152fadc458d90e4a
2016-11-23 13:48:32 +00:00
rsesek 98f2d80a58 [Mac/GN] Don't list any symlinks in the outputs of mac_framework_bundle.
Despite the comment left in 9522ddcc745f, the bots do not agree that this is
stable.

BUG=648757

Review-Url: https://codereview.chromium.org/2492493002
Cr-Original-Commit-Position: refs/heads/master@{#431098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7accb69c5cc3c08b6c36b2d616cf4a38892ade55
2016-11-10 00:38:04 +00:00
rsesek 91694b2d58 [Mac/GN] Re-do framework packaging to fix framework versioning.
Rather than trying to symlink as an action after producing the bundle, do it
as an early-stage action. As part of this, mac_framework_bundle callers need
to explicitly specify the top-level symlinks (framework_contents) that should
be created. Frameworks are now packaged like so:

1. At `gn gen` time, an exec_script runs to write the framework_version to a
   file. If the previous value written does not match the new value, the entire
   framework output directory is clobbered. This must be done at gen-time to
   ensure nothing tries to clean the framework while also attempting to copy
   to it.
2. Also at `gn gen` time, a TOC file for the framework_contents is written.
   This allows the build to emulate depending on the presence of the top-level
   symlinks, since ninja does not stat symlinks correctly.
   https://github.com/ninja-build/ninja/issues/1186
3. The package_framework.py action now runs before the main create_bundle().
   This action depends on the TOC file from (2) and will create all the
   required symlinks in the bundle. At the time this runs, the symlink target
   may not yet exist.
4. The create_bundle target is now always the leaf edge for
   mac_framework_bundle, and it copies all bundle contents to the fully
   versioned path (rather than through a symlink).

This should resolve the issue of the build not stabilizing between specifying
a framework_version and not.

BUG=648757

Review-Url: https://codereview.chromium.org/2487763002
Cr-Original-Commit-Position: refs/heads/master@{#430778}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9522ddcc745f739414607811da8a2c6a17dbb17a
2016-11-09 00:08:07 +00:00
sdefresne 72ef531e71 Add template to compile plist files.
Add new template compile_plist that merge multiple plist files and
perform variables subsitutions and change info_plist implementation
to use it.

The new template will be used to compile entitlements files that
need different substitutions and do not use the one for Info.plist.

BUG=613543

Review-Url: https://codereview.chromium.org/2475893002
Cr-Original-Commit-Position: refs/heads/master@{#430269}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7a7cd719032f146447c5b41ee6e243648ec0d397
2016-11-07 14:42:32 +00:00
sdefresne 46e067f9ab Extend tweak_info_plist template to support multiple plist file as input.
Rename build/config/mac/gen_plist.py to build/config/mac/plist_util.py
after splitting the possible action (currently variable substitution and
plist merging).

Extend tweak_info_plist template to add another parameter info_plists
corresponding to a list of path to merge before tweaking (this allow for
adding partial plist files depending on configuration options).

Always pass the --platform variable based on the value of $current_os
to the tweak_info_plist template and make args optional.

Refactor info_plist template to use separate steps for merge and variable
substitution (as the script now implement them as two separate actions).

BUG=613543

Review-Url: https://codereview.chromium.org/2480433002
Cr-Original-Commit-Position: refs/heads/master@{#429830}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9bb379e5fbd071abaf1359d724eb79b1ff6e7ceb
2016-11-04 08:19:37 +00:00
rsesek e3fe35db48 [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle.
Write the current framework_version to a file at gen-time, and clobber the
entire framework bundle if it differs from the current value in the file.

This has to be done at gen-time because it is not possible to run a script at
the create_bundle stage before any other dependencies in its tree run. Take
this sample graph:

                       bundle_data --> shared_library
                      /
  mac_framework_bundle
                      \
                       action("clean_framework_version")

It is not possible, from a mac_framework_bundle, to force the
clean_framework_version action to run before the shared_library. When the
action does run, its stamp will have a newer mtime than the shared_library.
Because bundle_data are hard linked into place, the link source file will
have an older mtime than the action, and the build will never stabilize.

BUG=648757
R=dpranke@chromium.org

Originally Committed: https://crrev.com/fed4fc1df8bab7159f19e04ed658c1f417e4e499
Reverted: https://crrev.com/d76ba00e6cc2625000d495e79bdc8d747645405e

Review-Url: https://codereview.chromium.org/2453043002
Cr-Original-Commit-Position: refs/heads/master@{#428366}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a74b313db5f7444667bcf6530f1b2740884f4bfd
2016-10-28 14:44:59 +00:00
hongchan 0bdb8cb0ae Revert of [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle. (patchset #1 id:1 of https://codereview.chromium.org/2453043002/ )
Reason for revert:
rules.gni file is causing the build failure.

------
/b/c/b/Google_Chrome_Mac/src/buildtools/mac/gn gen //out/Release --check
  -> returned 1
ERROR at //build/config/mac/rules.gni:313:3: Script returned non-zero exit code.
  exec_script("//build/config/mac/prepare_framework_version.py",
  ^----------
Current dir: /b/c/b/Google_Chrome_Mac/src/out/Release/
Command: python -- /b/c/b/Google_Chrome_Mac/src/build/config/mac/prepare_framework_version.py /b/c/b/Google_Chrome_Mac/src/out/Release/obj/ui/base/ui_unittests_framework_version /b/c/b/Google_Chrome_Mac/src/out/Release/ui_unittests Framework.framework ''
Returned 1.

Original issue's description:
> [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle.
>
> Write the current framework_version to a file at gen-time, and clobber the
> entire framework bundle if it differs from the current value in the file.
>
> This has to be done at gen-time because it is not possible to run a script at
> the create_bundle stage before any other dependencies in its tree run. Take
> this sample graph:
>
>                        bundle_data --> shared_library
>                       /
>   mac_framework_bundle
>                       \
>                        action("clean_framework_version")
>
> It is not possible, from a mac_framework_bundle, to force the
> clean_framework_version action to run before the shared_library. When the
> action does run, its stamp will have a newer mtime than the shared_library.
> Because bundle_data are hard linked into place, the link source file will
> have an older mtime than the action, and the build will never stabilize.
>
> BUG=648757
> R=dpranke@chromium.org
>
> Committed: https://crrev.com/fed4fc1df8bab7159f19e04ed658c1f417e4e499
> Cr-Commit-Position: refs/heads/master@{#428183}

TBR=dpranke@chromium.org,brettw@chromium.org,rsesek@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=648757

Review-Url: https://codereview.chromium.org/2453933006
Cr-Original-Commit-Position: refs/heads/master@{#428212}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d76ba00e6cc2625000d495e79bdc8d747645405e
2016-10-27 23:39:22 +00:00
rsesek 0c69e78a84 [Mac/GN] Fix rebuilds when changing framework_version of a mac_framework_bundle.
Write the current framework_version to a file at gen-time, and clobber the
entire framework bundle if it differs from the current value in the file.

This has to be done at gen-time because it is not possible to run a script at
the create_bundle stage before any other dependencies in its tree run. Take
this sample graph:

                       bundle_data --> shared_library
                      /
  mac_framework_bundle
                      \
                       action("clean_framework_version")

It is not possible, from a mac_framework_bundle, to force the
clean_framework_version action to run before the shared_library. When the
action does run, its stamp will have a newer mtime than the shared_library.
Because bundle_data are hard linked into place, the link source file will
have an older mtime than the action, and the build will never stabilize.

BUG=648757
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2453043002
Cr-Original-Commit-Position: refs/heads/master@{#428183}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fed4fc1df8bab7159f19e04ed658c1f417e4e499
2016-10-27 23:00:53 +00:00
erikchen 2a71e4cead Remove direct references to hermetic mac toolchain.
This ensures that the hermetic toolchain is only used if use_system_xcode is
false. This CL also causes two changes:
  * svn is assumed to be installed on the system. It is not pulled from the
  hermetic toolchain.
  * mac_sdk_build was used to populate the SDK version in the Info.plist. This
  was being populated with a different version than the SDK being used to build
  Chrome, which is incorrect.

BUG=651267

Review-Url: https://codereview.chromium.org/2412353003
Cr-Original-Commit-Position: refs/heads/master@{#425170}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6218c34684254f1c090bf501f6c46b0a69b63ec5
2016-10-13 21:38:05 +00:00
erikchen bbaba8789b Clean up some GN/hermetic build changes.
No functional changes, just style.

BUG=

Review-Url: https://codereview.chromium.org/2401573005
Cr-Original-Commit-Position: refs/heads/master@{#424199}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 55e37ffdfc5d1aa4f47ae7e9bc0c8bc58ba23af5
2016-10-10 18:46:14 +00:00
mark 0a0c073c60 Macs don't use backslashes as path separators
Review-Url: https://codereview.chromium.org/2402033002
Cr-Original-Commit-Position: refs/heads/master@{#423938}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0088f675519c6e1c90ff0717f09fb267d8a0e5f
2016-10-07 19:46:44 +00:00
erikchen 2b99cbd1e4 Add a variable use_system_xcode to GN.
Start plumbing it through to actions that require binaries from the Xcode
toolchain.

BUG=651267
TBR=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2388063003
Cr-Original-Commit-Position: refs/heads/master@{#423673}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b58a723ab22333fe40575f6992c3cb8c7dde0b0a
2016-10-06 21:02:17 +00:00
rsesek 6612261535 [Mac/GN] Add a package_type option to mac_app_bundle.
The default is to produce a .app bundle. This CL also adds an option to produce
a .xpc bundle, which is a MH_EXECUTE-type bundle structure with a different
extension.

BUG=604809

Review-Url: https://codereview.chromium.org/2369583002
Cr-Original-Commit-Position: refs/heads/master@{#420760}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5ebcfa81e37ff1ebb2ef4baf00096598631c5aa2
2016-09-23 22:52:55 +00:00
sdefresne 37fd368b5f Force rebuild of everything if the version of Xcode changes.
BUG=636031

Review-Url: https://codereview.chromium.org/2228143002
Cr-Original-Commit-Position: refs/heads/master@{#411491}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 64cd47fc5002365b42d3abe6d8381f5bb0dfcae1
2016-08-12 00:50:51 +00:00
rsesek a9c5321cb9 Partially revert 8b0cda7f8d3f9a4f1d53c78600fb0c62c7eec7f9.
That CL modified the conditions under which enable_dsyms and enable_stripping
get set, which is not desired. This leaves in place the change for sanitizers.

BUG=635242
R=dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2232943003
Cr-Original-Commit-Position: refs/heads/master@{#411306}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 002fbfa1c30058690e76c010d1b0b8801e8a2d39
2016-08-11 12:15:17 +00:00
dpranke 72dffd1803 Make sure dSYMs are created by default for Mac sanitizer builds.
They should be created by default for sanitizer builds (and were w/
GYP), but that setting got lost in the GN migration.

Also, this CL corrects the default logic for enable_dsyms and
enable_stripping so that we only do this for internal official
builds by default, rather than for all "official" builds (
since is_official_build is really an optimization setting, not
a description of how things should be packaged).

R=rsesek@chromium.org, thakis@chromium.org, inferno@chromium.org
BUG=635242

Review-Url: https://codereview.chromium.org/2230723002
Cr-Original-Commit-Position: refs/heads/master@{#410979}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b0cda7f8d3f9a4f1d53c78600fb0c62c7eec7f9
2016-08-10 06:21:17 +00:00
sdefresne 29a142f18e [iOS] Fix compilation of official build with Xcode 8.
When targeting iOS, do not enforce a specific version of the macOS
SDK (as the targets build with that SDK are only tool required for
the build using host_toolchain).

BUG=634373

Review-Url: https://codereview.chromium.org/2225203003
Cr-Original-Commit-Position: refs/heads/master@{#410886}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 750b90480e0fcc67e292444cfdc350171bdaed06
2016-08-10 00:09:59 +00:00
sdefresne 19b530769f [iOS] Always generate the final binaries using lipo.
To simplify the creation of binary bundles on iOS, always use lipo
to create the final binary, even when not generating fat binaries
(in that case the lipo invocation is just a simple copy unless dSYM
generation or code stripping are enabled).

BUG=635302

Review-Url: https://codereview.chromium.org/2222753003
Cr-Original-Commit-Position: refs/heads/master@{#410600}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c7091801f98c82e3a1a0aa5c89feed19738c713c
2016-08-09 07:08:06 +00:00
sdefresne f0243d7879 Stop sharing code between ios_framework_bundle & mac_framework_bundle.
The ios_framework_bundle and mac_framework_bundle templates were
sharing part of the implementation via the framework_bundle. This
template is unnecessarily complex due to differences between iOS
and macOS build so remove it and inline the implementation in the
two OS specific templates.

BUG=None

Review-Url: https://codereview.chromium.org/2209973002
Cr-Original-Commit-Position: refs/heads/master@{#409966}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9d5d9721db94c90e362f857be02b5f0de22a5219
2016-08-05 02:01:48 +00:00
sdefresne 5a22cc3ce7 Code sign simulator builds.
Xcode 8 requires that simulator builds are code signed (no code signing
identity is required) so always enable code signing (but do not copy the
entitlements on simulator).

BUG=None

Review-Url: https://codereview.chromium.org/2206723003
Cr-Original-Commit-Position: refs/heads/master@{#409623}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6bfffe7e86347e2018ca4c8dd32fe9ba97eb7ed8
2016-08-03 21:19:26 +00:00
sdefresne 8082a99afa Embeds the entitlements file in the binary in simulator builds.
Refactor the code to generate the entitlements file from codesign.py
in a file using the "generate-entitlements" command.

Only generate it for the default toolchain as Info.plist is only
generated for the default toolchain.

BUG=626686

Review-Url: https://codereview.chromium.org/2187343003
Cr-Original-Commit-Position: refs/heads/master@{#409248}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0f93390b516605f8487de6ec12956b00c3291a6c
2016-08-02 18:20:25 +00:00
justincohen 189f099cad Add mac hermetic support to build/config/mac/sdk_info.py.
BUG=632229

Review-Url: https://codereview.chromium.org/2183053006
Cr-Original-Commit-Position: refs/heads/master@{#408487}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 254e30c78ff58abdfe16235f687cf43f6c072296
2016-07-28 21:37:14 +00:00
sdefresne a9b05c2e7a Fix compilation of thin framework bundle for device.
The bundle_deps should always be forwarded to the create_bundle target
even if code signing is enabled (otherwise the Info.plist is not copied
into the framework bundle).

BUG=621708

Review-Url: https://codereview.chromium.org/2179293005
Cr-Original-Commit-Position: refs/heads/master@{#407838}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8a46dd22f51efdfa8d8df86771196c33f43dd9db
2016-07-26 17:17:24 +00:00
sdefresne b4e1962bf6 Convert ios_web_shell_test to GN.
BUG=629867

Review-Url: https://codereview.chromium.org/2173493002
Cr-Original-Commit-Position: refs/heads/master@{#407159}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cdf365d050f4d1a86c42818b3e1f760eedfc4315
2016-07-22 14:55:15 +00:00
sdefresne 1f730bf6bb Add Info.plist support to ios_framework_bundle template.
iOS framework requires a valid Info.plist file, so add support for
generating it to ios_framework_bundle template.

BUG=629867

Review-Url: https://codereview.chromium.org/2164393002
Cr-Original-Commit-Position: refs/heads/master@{#407127}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4edf6105b4fc4b98d12b23d8bf74e96d130dce54
2016-07-22 10:56:25 +00:00
sdefresne 693d9a15a3 Add bundle_deps to ios_{app,framework}_bundle templates.
Allow to specify dependencies that are only used by the create_bundle
target when using ios_app_bundle or ios_framework_bundle templates to
increase parallelism.

BUG=629867

Review-Url: https://codereview.chromium.org/2169973002
Cr-Original-Commit-Position: refs/heads/master@{#407102}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 047490e7bb0d5c4ef2862a7059931fdec4e69ce9
2016-07-22 08:50:52 +00:00
sdefresne d67f736c38 Query sdk-platform-path in build/config/mac/sdk_info.py.
The XCTest support (used for EarlGrey tests) requires linking against
XCTest.framework whose location is relative to sdk-platform-path, so
propagate via ios_sdk_platform_path variable in gn.

BUG=629867

Review-Url: https://codereview.chromium.org/2168873003
Cr-Original-Commit-Position: refs/heads/master@{#407093}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4eba1aaa77f9e89b2b1cdf117a7e6fd8175436e4
2016-07-22 07:47:02 +00:00
dpranke 8cf2311ff2 Downgrade Mac GN arg save_unstripped_output to just a variable.
It's not clear that we really need the GN arg `save_unstripped_output`
to be a user-configurable thing, so this change removes it from the
declare_arg() block in the build file and instead becomes a shorthand
for (enable_stripping && !enable_dsyms).

R=rsesek@chromium.org
BUG=623685, 628052

Review-Url: https://codereview.chromium.org/2163533002
Cr-Original-Commit-Position: refs/heads/master@{#406338}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1b53b935fb9febdbc52456d8643b02a39c83b737
2016-07-19 19:20:13 +00:00
sdefresne c4b9eac2b7 [iOS/GN] Fix generation of .dSYM for fat binary builds.
When creating fat binaries, the generation of the .dSYM file need to
use the fat binary and not the intermediate binaries. So for a fat
build, //build/config/mac:strip_all is an empty configuration and the
linker tools do not pass the flag requesting generation of the .dSYM
file to linker_driver.py, instead the flags are passed when "lipo" is
invoked.

Fix //build/toolchain/mac/linker_driver.py to look for both "-o" and
"-output" when looking for the linker output to allow wrapping "lipo"
in addition to the compiler linker (as "lipo" only accept "-output"
flag to specify the output file).

Always add //build/config/mac:strip_all to the dependencies of all
linkable targets on iOS (as is done on Mac) and fix cronet.

BUG=593582

Review-Url: https://codereview.chromium.org/2160653002
Cr-Original-Commit-Position: refs/heads/master@{#406253}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6e714433f6749c3664ca816d1c64a488828ef75d
2016-07-19 12:43:47 +00:00
rsesek 3e42079f19 [Mac/GN] Add a new linker_driver.py option to save unstripped linker output.
This declares a new GN arg save_unstripped_output that can be enabled if
enable_stripping=true. If true, then an unstripped copy of the linker output
will be saved in the output directory with an ".unstripped" suffix.

BUG=628052
R=mark@chromium.org

Review-Url: https://codereview.chromium.org/2157573002
Cr-Original-Commit-Position: refs/heads/master@{#406110}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7fa0d497278e20eb8f38e02269f0e88d8cffa9c2
2016-07-18 21:59:08 +00:00
sdefresne 3d751c1271 Add support for fat build to "ios_framework_bundle" target.
For a fat build, the "ios_framework_bundle" and "framework_bundle"
are a bit different for the non-default toolchain. The main target
is a shared library (instead of a bundle) and the "+link" target
depends on the "+link" target of the default toolchain (because it
is a fat binary framework so it make sense to link against that one).

The fat shared library is created using "lipo" to concatenate all
the thin shared libraries together.

BUG=603180

Review-Url: https://codereview.chromium.org/2135323002
Cr-Original-Commit-Position: refs/heads/master@{#405969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 31139a2a7ffb3b502b0a963b45c391759b167154
2016-07-18 09:51:18 +00:00
brettw f66fa5e68f Separate out target defaults in the GN build config.
This separates out the default values of configs for the various target types into well-named global variables that can be referred to in different places.

This allows us to move the set_defaults calls for various templates to the places where those templates are defined rather than putting them all in BUILDCONFIG. An example of this is the test() target defaults, where the actual template is declared in a .gni file but the defaults have to be global.

Review-Url: https://codereview.chromium.org/2150753002
Cr-Original-Commit-Position: refs/heads/master@{#405627}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: edb6ecc9667278999e8b885a4e79849887580d2d
2016-07-14 23:38:48 +00:00
sdefresne 3d00fe6c06 Fix build/config/mac/gen_plist.py.
When a modifier was used for a substitution, the modifier variable
value starts with a semi-colon but since the code was testing with
string without the semi-colon no substitution was performed.

The substitution rules for :identifier and :rfc1034identifier were
swapped (:rfc1034identifier is the one using '-').

If the value contained '_' the :rfc1034idenfifier modifier should
have substitued a '-' but didn't (gyp had the same issue, fixed by
https://codereview.chromium.org/2141973002/).

BUG=625875

Review-Url: https://codereview.chromium.org/2142903002
Cr-Original-Commit-Position: refs/heads/master@{#404814}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b17a345954748b984d68e06080ad9733339f4dd2
2016-07-12 18:16:27 +00:00
marshall b7b13b8d74 Mac: Use unique output path for compile_xibs template in GN
BUG=623237
R=rsesek@chromium.org

Review-Url: https://codereview.chromium.org/2130793003
Cr-Original-Commit-Position: refs/heads/master@{#404416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b273ced692cd454d1d2b9b6ff8ac9bf97754ce2
2016-07-08 16:52:01 +00:00
rsesek 3912e50f5e [Mac/GN] Assert if the SDK version is 10.11 but Xcode is <7.3.
There is a known incompatibility when using the 10.11 SDK and Xcode 7.2

BUG=620127
R=mark@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/2094693002
Cr-Original-Commit-Position: refs/heads/master@{#402977}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 42e3c3e7125d71393abb461ff00242a8d2d8aa57
2016-06-29 23:08:57 +00:00
rsesek 555de3b76a [Mac/GN] Let //chrome/browser:browser be a static library.
This requires //chrome:chrome_framework to link with -ObjC to force categories
to load from static archives.

BUG=618797
R=brettw@chromium.org

Review-Url: https://codereview.chromium.org/2083153002
Cr-Original-Commit-Position: refs/heads/master@{#402836}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d4ee99258720a95788c8465aef4562c479872f03
2016-06-29 16:48:45 +00:00
sdefresne 4c3d20c72f Fix script and compiler invocation when using non-default toolchain.
According to "gn help root_build_dir" the variable corresponds to the
current directory when executing all compilers and scripts. So when
building the command-line for compilers or scripts, "rebase_path"
must use "root_build_dir" instead of "root_out_dir" otherwise they
will break if building for non-default toolchain.

BUG=603180

Review-Url: https://codereview.chromium.org/2109133002
Cr-Original-Commit-Position: refs/heads/master@{#402825}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9b9b27be5e7007fb73ef6e0087e452227d92bbc6
2016-06-29 16:04:56 +00:00
rsesek a33507dfa8 [Mac/GN] Add missing -Wobjc-missing-property-synthesis.
This also adds a missing __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE define.

BUG=622889
R=dpranke@chromium.org
TBR=rohitrao@chromium.org

Review-Url: https://codereview.chromium.org/2092133002
Cr-Original-Commit-Position: refs/heads/master@{#401984}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 227e59731da9ca04c4ceb9c6cb4725a07e15c199
2016-06-24 21:52:16 +00:00
msarda d8db0b2e10 Set the right product type in GN for mac bundle targets.
BUG=NONE

Review-Url: https://codereview.chromium.org/2042723003
Cr-Original-Commit-Position: refs/heads/master@{#399873}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5d9216f03c0e5a41af0bde3cbcf4b8ce794e89b6
2016-06-15 10:21:46 +00:00
rsesek 08d8fd55be [Mac/GN] Write PkgInfo files for .app bundles.
BUG=431177
R=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2055933002
Cr-Original-Commit-Position: refs/heads/master@{#399166}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5c425ca31d354abef69b785a6ddba6360a82651c
2016-06-10 13:03:08 +00:00
rsesek d8ebdd5d6d [Mac/GN] Add //build/config/mac/package_framework.py.
This moves another step performed by gyp-mac-tool into a standalone script. In
addition, support for more top-level bundle directories (e.g. Helpers, XPCServices,
etc.) is added.

BUG=616813,604809
R=sdefresne@chromium.org

Review-Url: https://codereview.chromium.org/2055673002
Cr-Original-Commit-Position: refs/heads/master@{#398884}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 51dc7dae178061bfcc559f16d85e43f2695efacf
2016-06-09 15:15:09 +00:00
rsesek c1425f4066 [Mac/GN] Implement dSYM generation and stripping.
This creates a new script called the linker driver, which runs all three
steps of linking: the image link, debug info link, and stripping. In GYP,
the last two steps were handled as postbuilds, but GN lacks those. Instead,
the linker driver performs all three operations in one build step.

BUG=330301,431177
R=mark@chromium.org,dpranke@chromium.org

Review-Url: https://codereview.chromium.org/1999513002
Cr-Original-Commit-Position: refs/heads/master@{#397880}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b89811bd0b77ae38f45359c6d78a5e06b997e499
2016-06-04 01:26:19 +00:00
sdefresne c7edf0fac5 [iOS/GN] Add support for info_plist_target to ios_info_plist.
Chrome on iOS needs to use tweak_info_plist, so port support
for info_plist_target from mac_info_plist to ios_info_plist.

BUG=617134

Review-Url: https://codereview.chromium.org/2033403003
Cr-Original-Commit-Position: refs/heads/master@{#397727}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0ab61670fb9d7826de41e313004a0e4d0379da6
2016-06-03 16:41:11 +00:00
sdefresne 08b013a661 [GN] Allow configuration of the output of ios_info_plist template.
Allowing the invoker of ios_info_plist output can help remove one
intermediate target when generating some bundles.

BUG=459705

Review-Url: https://codereview.chromium.org/1996913003
Cr-Original-Commit-Position: refs/heads/master@{#395073}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 59302f49921ea20fe7b6a722892c912f8ca84656
2016-05-20 15:00:13 +00:00
sdefresne 3468d8d8aa [GN] Use "xcrun" instead of "xcodebuild" to get information on SDK.
Use "xcrun" instead of "xcodebuild" as it is much faster and available
on all version of OS X supported for building Chrome.

Reduce running time of "gn gen" from 2.5 to 2.2s on MacBook Pro
laptop.

BUG=609541

Review-Url: https://codereview.chromium.org/1993653002
Cr-Original-Commit-Position: refs/heads/master@{#394505}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 268142df3c289fcd2605cd68f41e04ebade1067b
2016-05-18 19:36:03 +00:00