Remove workaround in build/config/ios/rules.gni now that gn has
been rolled to include support for product_type property.
BUG=597975
Review-Url: https://codereview.chromium.org/1948753002
Cr-Original-Commit-Position: refs/heads/master@{#394116}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 27e8737ee5fbc9cf0b8a2d4a2076cd07030f7096
Add a new target convert_plist to invoke "plutil -convert" only on a
given plist file. This is used as iOS needs to convert all plist to
binary in bundle, including plist that are not Info.plist files.
Fix ios_info_plist and info_plist templates to also forward "visibility"
from the invoker.
BUG=459705
Review-Url: https://codereview.chromium.org/1964393002
Cr-Original-Commit-Position: refs/heads/master@{#392924}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7f441707e74fd96a04ecdd0c97f1f66d83e7bf5d
tools/gn/xcode_object.{cc,h}
Implements a class hierarchy mimicking the structure of an Xcode
pbxproj file with methods to dump them as text file.
tools/gn/xcode_writer.{cc,h}
Implements generation of Xcode project structure from GN settings
and for dumping the output to pbxproj and xcworkspacedata files.
tools/gn/*
Add product_type field to create_bundle target. This is used when
generating the Xcode project file to use the correct product type
in Xcode.
Fix a minor DCHECK failure in create_bundle_target_generator.cc.
build/config/compiler/BUILD.gn
Remove -fdebug-prefix-map from the clang command-line as it does
not work with Xcode (and is unnecessary as the path given to the
compiler are relative already).
With this flag, Xcode cannot find the source file when debbugging
the application, without it breakpoint and displaying code work.
BUG=597975
Review-Url: https://codereview.chromium.org/1827103005
Cr-Original-Commit-Position: refs/heads/master@{#391377}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6ee04b5ce48981fd997b94c58240602df1a329d6
Refactor out common code between Mac and iOS Info.plist generation using gn and
make separate mac_info_plist and ios_info_plist templates for use with existing
mac_framework_bundle, mac_app_bundle, and ios_app_bundle templates.
BUG=297668
Review URL: https://codereview.chromium.org/1877523002
Cr-Original-Commit-Position: refs/heads/master@{#389682}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7df5f898fc2ccd951ac36fb18a485775586b4dcf
Several targets require a build-time dependency on a framework bundle, but not a
link-time one. This can be if the target is only using the framework for its
resources or if it dlopen()s it at run-time.
framework_bundle now adds another target (target_name+link) that can be used if
something wants a link-time dependency on the framework bundle. By default, only
a build-time dependency is created.
BUG=297668
R=sdefresne@chromium.org,brettw@chromium.org
Review URL: https://codereview.chromium.org/1910133002
Cr-Original-Commit-Position: refs/heads/master@{#389528}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 152572b1ae44de42b011c667c1d8bf317810851e
This leaves the existing bundle_data_xib rule for iOS but re-implements it
using a new compile_xibs template. This also adds mac_xib_bundle_data to
call the compile_xibs template and add a bundle_data.
BUG=297668
R=sdefresne@chromium.org
Review URL: https://codereview.chromium.org/1897853003
Cr-Original-Commit-Position: refs/heads/master@{#388186}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ef017e6f2fe72ce3cb2c2aa0150b898a044fd39c
The generated dylib will be available to the application via the
framework bundle so add "-install_name @rpath/XXX.framework/XXX"
when using the "ios_framework_bundle" template.
BUG=599321,599322
Review URL: https://codereview.chromium.org/1882423002
Cr-Original-Commit-Position: refs/heads/master@{#387273}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 598d2cbd50dee2c81201c10f662a74c7dd7dec18
Fix the ios_framework_bundle template to create a new public config
so that anyone depending on the target will correctly link against
it. Change framework_bundle to use public_deps in order to make the
public config accessible.
Create //ios/third_party/earl_grey target.
BUG=599321
Review URL: https://codereview.chromium.org/1879003002
Cr-Original-Commit-Position: refs/heads/master@{#387265}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 22de3c95e286c337ebdf32e424f911d00f209350
Change compile_xib template to work with different types of xib
files (some do generate xxx.nib/... while other just generate a
single xxx.nib).
Add resources required by ios_chrome_unittests to the application
bundle including compiled native_content_controller_test.xib.
BUG=546283,459705
Review URL: https://codereview.chromium.org/1880393004
Cr-Original-Commit-Position: refs/heads/master@{#387264}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2cb71a8ba37fd387113fb2b9f2407f750be158dc
Add a //testing/iossim target on the default_toolchain that symlink
to //testing/iossim($host_toolchain) for compatibility with gyp and
bots.
BUG=459705
Review URL: https://codereview.chromium.org/1882843002
Cr-Original-Commit-Position: refs/heads/master@{#387201}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 89488f08f90710c57e40e4ef81a19d35914d374b
Reason for revert:
gn binary as been fixed and create_bundle now causes its data_deps to be built, reverting this temporary change.
Original issue's description:
> Work around a bug where create_bundle() is ignoring data_deps() in iOS GN build.
>
> It looks like create_bundle() is not checking for data_deps when it
> generates its ninja rules, and as a result we don't build iossim
> when we build base_unittests.app. By shifting the data_dep to the
> underlying executable target, this works around the issue, but we
> should probably fix the GN code generator for create_bundle() instead.
>
> R=sdefresne@chromium.org
> BUG=599203
>
> Committed: https://crrev.com/cd03fa72212077a789679a77992529c3aa6c08fe
> Cr-Commit-Position: refs/heads/master@{#384141}
TBR=dpranke@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=599203
Review URL: https://codereview.chromium.org/1883843002
Cr-Original-Commit-Position: refs/heads/master@{#386994}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d76422e697ad4de2edac5b23f12da1ee5e9dcd56
Add support for copying public headers to the ios_framework_bundle
template and use this to implement the //ios/third_party/ochamcrest
target.
Add a set_defaults for ios_framework_bundle and mac_framework_bundle
to build/config/BUILDCONFIG.gn so that overriding "configs" works as
expected.
BUG=599322
Review URL: https://codereview.chromium.org/1879493002
Cr-Original-Commit-Position: refs/heads/master@{#386957}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8fab21c694073ca4db23495b715770385c597e1a
Extract commonalities to framework_bundle and rename mac_framework to
mac_framework_bundle for consistency & introduce ios_framework_bundle.
Rename app template from build/config/ios/rules.gni to ios_app_bundle
for consistency.
BUG=None
Review URL: https://codereview.chromium.org/1871413002
Cr-Original-Commit-Position: refs/heads/master@{#386673}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1a969442c07ee8642074b4f204cdfb4c9e630995
It looks like create_bundle() is not checking for data_deps when it
generates its ninja rules, and as a result we don't build iossim
when we build base_unittests.app. By shifting the data_dep to the
underlying executable target, this works around the issue, but we
should probably fix the GN code generator for create_bundle() instead.
R=sdefresne@chromium.org
BUG=599203
Review URL: https://codereview.chromium.org/1845753002
Cr-Original-Commit-Position: refs/heads/master@{#384141}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd03fa72212077a789679a77992529c3aa6c08fe
Add a new template bundle_data_xib that compile a xib or storyboard
file and declare a bundle_data target with the compilation output.
Add bundle_data targets required to get ios_web_shell to build and
run in the simulator.
BUG=297668,546283
Review URL: https://codereview.chromium.org/1808733003
Cr-Original-Commit-Position: refs/heads/master@{#383295}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f33a28da1492886771cefe133372077b762a9077
Define a global assert_no_deps on iOS (in ios/build/config.gni) and
use it in targets that have been fixed to work on iOS to prevent
further regression.
BUG=297668
Review URL: https://codereview.chromium.org/1812823002
Cr-Original-Commit-Position: refs/heads/master@{#382286}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bb3d6abbcdd5471561da7ea8da7740048e4b4a01
When targetting simulator, builds iossim as a data_deps for all iOS
application bundle as it is required to run the bundle on simulator
from the command-line.
BUG=594519
Review URL: https://codereview.chromium.org/1800083003
Cr-Original-Commit-Position: refs/heads/master@{#381696}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8d689ca9b2db1f4a5629c50e5fc2f97e47795197
Add a new script //build/config/ios/ios_gen_plist.py to generate the
Info.plist by merging multiple source files, performing substitutions
of variables and converting to binary1 format.
Expand //build/config/ios/ios_sdk.gni to output variables required
for the substitution of variables in Info.plist.
Refactor ios_app template to use bundle_data and create_bundle to
create the application bundle.
BUG=297668
Review URL: https://codereview.chromium.org/1752873002
Cr-Original-Commit-Position: refs/heads/master@{#381429}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 01285787153c6abbaaa7f86ace3023dd89159476
The test template was forwarding output_name and output_extension to the ios_app template, but that isn't used by the ios_app template. If somebody actually uses this value, they'll get an error, so it's better to not pretend to support it.
The test template also forwarded visibility which was never used by ios_app. This should be used so is now hooked up to the group generated by ios_app.
Review URL: https://codereview.chromium.org/1801833002
Cr-Original-Commit-Position: refs/heads/master@{#381057}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 71f8ea104d391816e5ca040534dcc3b288b0a59b
Chrome on iOS requires iOS 9.0 as it uses WKWebView (and the version
from iOS 8.0 lacks some required features). Increate the minimum iOS
version in build/common.gypi.
BUG=569158
Review URL: https://codereview.chromium.org/1704933002
Cr-Original-Commit-Position: refs/heads/master@{#375862}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 77193364a92ca0636fe8774ce6e37bedff9bbf88
The recent formatter alphebetizing change is causing a lot of noise in
code reviews. Figured it'd be worth a clean-up CL.
Exact command I ran:
find . -name "*.gn*" -exec gn format --in-place "{}" \;
TBR=ddorwin@chromium.org
BUG=554928
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1464873002
Cr-Original-Commit-Position: refs/heads/master@{#360891}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d7a71c88990b6788ceaf1ec9ee518099709ff3fd
Nobody actually needs to remove these, so I merged them with the runtime library configs that don't need to be referenced by the BUILDCONFIG.gn file.
This adds a posix BUILD.gn file. More stuff from the compiler config can go here in the future. For now, it just has the sysroot setup for Posix.
Review URL: https://codereview.chromium.org/1367403002
Cr-Original-Commit-Position: refs/heads/master@{#352077}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 888b65f239fb3154c4adbe3fb3c42eae164f1031
It is deprecated and public_deps should be used instead, which will have the
same effect.
BUG=None
TEST=gn gen out-gn/Release --args='is_debug=false is_component_build=false symbol_level=1'
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/1361633004
Cr-Original-Commit-Position: refs/heads/master@{#350250}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3a025353ed7d5639017b9a7f20da47e046f33372
I've taken ad591c629a
and merged it onto Chromium ToT, with a few lint and other cleanups,
and one fix to make sure that Mac still compiled (which may have broken
iOS, haven't tested yet).
R=brettw@chromium.org, sdfresne@chromium.org
BUG=459705
CQ_EXTRA_TRYBOTS=tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg
Review URL: https://codereview.chromium.org/1250913002
Cr-Original-Commit-Position: refs/heads/master@{#342297}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a29462a04dabad3fc20dc922227c46b36459912
A starting point for doing all of src, and adding a PRESUBMIT.
Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.
Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat
The only things that I don't love in the current output are:
1. Turning
args = [
"--depfile", rebase_path(depfile, root_build_dir),
"--android-sdk-tools", rebased_android_sdk_build_tools,
"--dex-path", rebased_output,
]
into:
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
"--android-sdk-tools",
rebased_android_sdk_build_tools,
"--dex-path",
rebased_output,
]
The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.
2. Turning single line
if (defined(invoker.inputs)) { inputs = invoker.inputs }
into
if (defined(invoker.inputs)) {
inputs = invoker.inputs
}
This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.
In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.
R=brettw@chromium.org
BUG=348474
Review URL: https://codereview.chromium.org/766573003
Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
This fixes a lot of minor mistakes (mostly missing/extra files and flags) for the Mac GN build.
I separated out some clang flags into a config for extra clang warnings. Several of the third party libraries needed to remove this.
Removes the use_nss flag and uses !use_openssl. This is a result of discussion with rsleevi.
Removes extra duplicate net build file from secondary tree.
ui/gesture_events seems to be getting compiled in GN with more strict warnings than in GYP. Rather than fix this, I fixed the warning in the gesture recognizer unit test. It was returning a const copy (the const is pointless when you're copying).
This also removes a bunch of old GYP integration stuff that was left in the GN build.
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/239543013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@264626 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Updates all rebase_path calls to use the new parameter ordering.
Use the new getenv function and delete the Python script we had to get the home directory.
Takes advantage of the new ability to have the default value of declare_args blocks be dependent on other values. This simplifies some code.
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/164773005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@252065 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This properly sets the DEPLOYMENT_TARGET in the generated GYP file (previously this value wa salways hardcoded to empty -- whoops!).
Sets the simulator properly. Previously when not using an explicit SDK the Xcode generator would still end up with a simulator build. This turns the flag into a tri-state so gyp_chromium can set it explicitly when an SDK is specified, but otherwise we can trigger default behavior based on Xcode/Ninja.
TBR=scottmg
Review URL: https://codereview.chromium.org/155983003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@249643 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Separates out some "SDK" related setup on Mac land Linux like we do on Windows. I'm trying to make the "compiler" BUILD file just compiler warnings and CPU options, and have system library stuff on the platform directories.
This adds the capability for GN to produce GYP files on Mac that vary according
to the GYP generator as well as target-vs-host. I added a bunch of logic to the
GN iOS build to set up stuff accordingly based on my current knowledge of
what's required.
Sadly, this means we now have an 8-way GN build (all combinations of
debug/release, host/target, and xcode/ninja). I did some refactoring of the GYP
code in GN to make this less unreasonable.
I checked that the GYP files look the way I want, but I didn't actually test
the resulting builds yet. There is still likely to be some conditions wrong or
things not being set properly. I'm going to follow up with a second pass based on actual testing.
I believe, however, that with this new GYP generator code in GN, we can express
in the .gn files what we need to do the iOS build.
Review URL: https://codereview.chromium.org/149163005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@248476 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This hooks up detection for the "-arch" flag on Mac to set the GYP "ARCH" xcode variable. GN then removes the -arch argument from the compiler args, since GYP will then re-add it based on the ARCH value. Previously, not doing this resulting in mutliple "-arch" arguments to the compiler since GYP would always insert its own.
Disables some warnings on Windows for the re2 target to match the GYP build. The third warning (4018) that the GYP build sets is disabled globally so there's no need to do it for this target.
Hooks up some iOS SDK stuff.
BUG=336667
TBR=thakis@chromium.org
Review URL: https://codereview.chromium.org/141433015
git-svn-id: http://src.chromium.org/svn/trunk/src/build@247206 4ff67af0-8c30-449e-8e8b-ad334ec8d88c