summaryrefslogtreecommitdiffstats
path: root/tools/gn/target.h
Commit message (Collapse)AuthorAgeFilesLines
* Add hard dependencies and compile prereqs to GNbrettw@chromium.org2013-09-111-0/+13
| | | | | | | | | | | | Source_prereqs allow you to specify additional implicit dependencies of the source files. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/23526036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222622 0039d316-1c4b-4281-b951-d872f2087c98
* Add ability to rename a target's output name.brettw@chromium.org2013-09-101-0/+5
| | | | | | | | | | | This allows us to remove some awkward naming. BUG= R=jamesr@chromium.org Review URL: https://codereview.chromium.org/23726025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222382 0039d316-1c4b-4281-b951-d872f2087c98
* Remove nss hack in chrome.brettw@chromium.org2013-09-101-2/+3
| | | | | | | | | | | | | | | | | This does more correct dependencies and flags for linking NSS into Chrome. It adds buildfiles for skia. The library compiles on Linux but likely not other systems at this point and is still a bit of a mess. Defines are now escaped properly so you can have quotes in defined values (this was needed for Skia). This adds a describe command for printing out the applying ld flags, and removes duplicates earlier using a new OrderedSet container. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/23480042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222377 0039d316-1c4b-4281-b951-d872f2087c98
* The ldflags are now inherited across module boundaries until a shared ↵brettw@chromium.org2013-09-101-0/+38
| | | | | | | | | | | | | | | | | | | | library or executable is encountered. This is necessary for the ldflags to actually have any effect in most cases. Since this flag is special there is some minor refactording in Target to make it work. The GYP command will now request that GYP itself output library dependencies which we'll suck in and use so that libraries inherited up the dependency tree in GYP will also be inherited into the GN portion of the build. Minor changes to label to make it easier to construct one with no toolchain specified. I added a helper class for iterating over the config values associated with a target and used it in a number of places. This ensures we always use the same order for walking these. I did a bunch of work on groups to make it so that if you depend on a group it is like depending directly on that group's deps. The chrome target will now compile on Linux with GN, using GYP versions of everything else. I added a number of other third_party libraries it needs. There are still some hacks and TODOs in this. R=thakis@chromium.org Review URL: https://codereview.chromium.org/23550007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222368 0039d316-1c4b-4281-b951-d872f2087c98
* Add a GYP command to GN. This runs GYP and then GN, and does some work to ↵brettw@chromium.org2013-08-291-0/+5
| | | | | | | | | | | | | | | | | | | integrate the builds. Adds an "external" variable that's set in the GYP mode of GN that will cause it to not write out a target but to pretend it's there. These are the ones that should be generated by GYP. This value is not used in the normal "gen" mode so we actually have two builds: a separate GN-only build that includes GN itself and some other low-level libraries, and a hybrid build. This renames and moves some of the GN targets so that the names and locations match those of the GYP build. I prefixed the ninja rules for the default toolchain to avoid colliding with the GYP ones. I also fixed some places where the rules were not getting prefixed. I added an exception to target output labeling to avoid double-prefixing with "lib". TBR=scottmg BUG= Review URL: https://codereview.chromium.org/23493013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220367 0039d316-1c4b-4281-b951-d872f2087c98
* This make the GN current dir be set on thte scope. This fixes a bug where a ↵brettw@chromium.org2013-08-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | template execution uses the directory of the file containing the template declaration. This makes it impossible to refer to the input files which are normally specified relative to the invoking file. I added a defined() function that returns true if a variable has been defined. This needed some magic function invocation help because we don't actually want to evaluate the argument. I added an optional second argument to assert for an error message. We now tolerate absolute file paths for sources and outputs. Grit was outputtings these, which was confusiong some of our assertions. We'll now check if such locations are inside our source tree and fix them up accordingly. I fixed a bug in the "desc" command where a target would be listed as a dependent of itself. I also added the target type to the output. Note that I didn't implement MakeAbsolutePathRelativeIfPossible on Windows. I will do this on Windows in a second pass. Currently it's an #error. There are several fixes to custom script target outputs and fixes to variables leftover from when I converted paths to start with two slashes. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/23396002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@219161 0039d316-1c4b-4281-b951-d872f2087c98
* Various config fixes in GN.brettw@chromium.org2013-08-211-1/+12
| | | | | | | | | | | | | | | | | | | | This makes direct and all dependent configs also apply to the current target. Previously you had to specify the same thing in the "configs" variable in addition, and I can't think of a case where you don't want this. This makes it so that a config applies only once. Previously we would merge dependent configs and get duplicates, which would mean lots of duplicate build flags which was obvious on the command line. Adds the ability to forward direct dependent configs from one target to another. This matches GYP's export_dependent_settings feature which we use a surprising amount. R=scottmg@chromium.org Review URL: https://codereview.chromium.org/22833006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218865 0039d316-1c4b-4281-b951-d872f2087c98
* Split apart various target type code.brettw@chromium.org2013-08-131-19/+8
| | | | | | | | | | | | | | | | | | This splits apart the "generators" that fill the Target objects from script, and the "writers" that write the .ninja files. These now have different objects and files for the basic target types. The result is that it looks like much more stuff due to the extra files, but it should be easier to follow what's happening and to make additions in the future. Remove some extra loadable module stuff I missed in the previous removal. Adds more support for the Linux build. Not everything is working yet, but most of base compiles. This actually writes .ninja files and targets for "group" types, and removes the "none" target type which this mapped to before. This way you can make a target group and actually compile that set of stuff by typing its name. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/22488015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217279 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for data deps.brettw@chromium.org2013-08-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | Data deps are non-linked dependencies of a target. They are built in parallel (they are not input dependencies). I redefined "data" to mean data file dependencies, and added a new "datadeps" contept for non-linked target dependencies. Fix a bug to make it not crash if there's nothing to generate. Add variable documentation for some vars. Removed support for some builtin vars "root output dir name" and related. These had changed definition from when I originally wrote them, and I don't think there's any use for these values. We can add them back if we need. I moved the variable name constant declarations from scope_per_file_provider to the new variables file which includes documentation. I added support for getting the name of the current toolchain via a builtin variable. I removed support for solink_module which is not necessary. This was a way to express a .dll target that isn't linked to its dependees, but that's no longer necessary for datadeps. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/22290010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215976 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 214325 "Revert 214254 "Add initial prototype for the GN m..."bauerb@chromium.org2013-07-301-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue was already fixed :) > Revert 214254 "Add initial prototype for the GN meta-buildsystem." > > It broke the check_licenses step on Android (see http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/39904/steps/check_licenses/logs/stdio): > > @@@BUILD_STEP check_licenses@@@ > > /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan > Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/base/third_party/dynamic_annotations > Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/third_party/modp_b64 > < /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan > ERROR: process exited with code 2 > @@@STEP_FAILURE@@@ > > > > Add initial prototype for the GN meta-buildsystem. > > > > This is currently not hooked into the build. To build, add a reference to the > > gn.gyp file to build/all.gyp > > > > R=darin@chromium.org, scottmg@chromium.org > > > > Review URL: https://codereview.chromium.org/21114002 > > TBR=brettw@chromium.org > > Review URL: https://codereview.chromium.org/21084010 TBR=bauerb@chromium.org Review URL: https://codereview.chromium.org/21204003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214333 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 214254 "Add initial prototype for the GN meta-buildsystem."bauerb@chromium.org2013-07-301-145/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It broke the check_licenses step on Android (see http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/39904/steps/check_licenses/logs/stdio): @@@BUILD_STEP check_licenses@@@ > /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/base/third_party/dynamic_annotations Got LicenseError "missing README.chromium or licenses.py SPECIAL_CASES entry" while scanning tools/gn/secondary/third_party/modp_b64 < /b/build/slave/Android_Builder__dbg_/build/src/android_webview/tools/webview_licenses.py scan ERROR: process exited with code 2 @@@STEP_FAILURE@@@ > Add initial prototype for the GN meta-buildsystem. > > This is currently not hooked into the build. To build, add a reference to the > gn.gyp file to build/all.gyp > > R=darin@chromium.org, scottmg@chromium.org > > Review URL: https://codereview.chromium.org/21114002 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/21084010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214325 0039d316-1c4b-4281-b951-d872f2087c98
* Add initial prototype for the GN meta-buildsystem.brettw@chromium.org2013-07-291-0/+145
This is currently not hooked into the build. To build, add a reference to the gn.gyp file to build/all.gyp R=darin@chromium.org, scottmg@chromium.org Review URL: https://codereview.chromium.org/21114002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214254 0039d316-1c4b-4281-b951-d872f2087c98