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
In GYP Mac, most targets got a default set of mac libraries by virtue
of depending on base, which due to a GYP bug pushed the libraries to
all targets depending on base, even separate shared libraries.
In GYP Windows the set of default libraries on Windows is global and
this keeps the same list and behavior.
The lists of libraries could use some cleanup, btu this patch just
attempts to keep the status quo in a cleaner way rather than fixing the
unreasonable list of libraries (especially on Windows).
R=scottmg@chromium.org, scottmg
Review URL: https://codereview.chromium.org/131513026
git-svn-id: http://src.chromium.org/svn/trunk/src/build@249600 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This hooks up Clang in the pure GN build (not the hybrid GYP mode).
Clang gave some warnings about compiler flags which made me realize that we were giving linker flags to the compiler in some cases. So I enhanced our pkg-config wrapper to to add libraries to the cflags (missing else), return ldflags separately, and also strip out -pthread which was getting included over and over.
BUG=
Review URL: https://codereview.chromium.org/147923010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@248477 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
This supports specifying the output_dir generator flag in the gn-generating-gyp
mode. The value of the output_dir flag is mapped to a gyp variable called gyp_output_dir
and a GN argument by the same name. References from gyp to gn-generated gyp files must
use this variable and references from BUILD.gn files must use the gn argument.
BUG=335760
TBR=brettw for build/config/BUILDCONFIG.gn (looked at in person)
Review URL: https://codereview.chromium.org/142223002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@245800 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This emulates optimize=max from GYP. One difference is that this applies for all build types. The GYP one only applied optimize=max for the Official build. I can't think of why this should be the case, and it seems confusing to have such arbitrary official build differences.
R=bbudge@chromium.org
Review URL: https://codereview.chromium.org/138903002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@244839 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This makes make_global_settings closer to the GYP version. Previously it had relied on GYP concatenating two lists when running with goma, but it doesn't actually behave this way, resulting in unexpected output.
TBR=scottmg
Review URL: https://codereview.chromium.org/132833002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@244104 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Adds arm version and some android configuration build flags.
This adds most of the logic from common.gypi to the Android GN build.
This is currently missing the crtbegin/end stuff and won't actually make real Android builds. The logic in this patch is just the initial conversion that will require testing and several more passes of fixes.
R=torne@chromium.org, torne
Review URL: https://codereview.chromium.org/121173005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@243681 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Refactors the toolchain definitions by adding an include file to help defining GCC toolchains. This eliminates most of the duplication on Linux and Android. Adds make_global_settings for most Linux and Mac builds that should match the GYP build (this will require some more passes to get every place to be an exact match).
Fixes Android build issues in WebKit. Fixes the definition of is_android.
Renames the Linux toolchains to use the GN name of the CPU architecture so one can refer to them without conditionals. Remove conditionals from BUILDCONFIG.gn
Adds the gyp_header variable to the help (it wasn't getting inserted into the list of available variables).
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/117863003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@242674 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds support similar to the GYP scripts for running pkg-config in the presence of sysroots.
It also adds the linker flags by calling the existing horrible sysroot_ld_path.sh shell script that extracts stuff from the sysroot's configuration.
With this change, official 32-bit linux builds work in the checked in 32-bit Debian sysroots.
R=piman@chromium.org
Review URL: https://codereview.chromium.org/116803003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@241397 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This passes the official build and branding flags to the GN build. Currently, this is used to hook up the proper sysroot for compiling on Linux for official builds. The 32-bit branded build does not compile currently due to pending pkgconfig issues.
Fix a bug where assertions in the build config would not get reported properly. This was because I forgot to actually throw the error at the toplevel.
BUG=
R=piman@chromium.org
Review URL: https://codereview.chromium.org/115643002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@240918 4ff67af0-8c30-449e-8e8b-ad334ec8d88c