Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: tools/gn/gyp_target_writer.h

Issue 149163005: Work on GN iOS build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/gyp_target_writer.h
diff --git a/tools/gn/gyp_target_writer.h b/tools/gn/gyp_target_writer.h
index afe6a851b273e3401ac32e3aeda5b62baa943f89..09bb820f654ab6011e0fb88788b4e61449a0c3c6 100644
--- a/tools/gn/gyp_target_writer.h
+++ b/tools/gn/gyp_target_writer.h
@@ -22,14 +22,16 @@ class Toolchain;
class GypTargetWriter {
public:
struct TargetGroup {
- TargetGroup()
- : debug(NULL),
- release(NULL),
- host_debug(NULL),
- host_release(NULL),
- debug64(NULL),
- release64(NULL) {
+ TargetGroup();
+
+ // Returns "a" record associated with this group. This is used when getting
+ // general things like the sources list that should be the same across all
+ // records in a group.
+ const BuilderRecord* get() const {
+ // We assume we always have either a host or a target debug build.
+ return debug ? debug : host_debug;
}
+
const BuilderRecord* debug;
const BuilderRecord* release;
@@ -42,6 +44,22 @@ class GypTargetWriter {
// On Windows, we do both 32-bit and 64-bit builds. Null on non-Windows.
const BuilderRecord* debug64;
const BuilderRecord* release64;
+
+ // On Mac/iOS, there are some nontrivial differences between the GYP Ninja
+ // build and the GYP XCode build. In GYP, these are parameterized as
+ // conditions using the generator flag. To emulate this, we have different
+ // builds for the XCode and Ninja versions of the GYP file, and the
+ // generator wraps everything in a big condition so that GYP does the right
+ // thing.
+ //
+ // These refer to the GYP-XCode build. The "regular" debug and release
+ // targets above refer to the GYP-Ninja build.
+ const BuilderRecord* xcode_debug;
+ const BuilderRecord* xcode_release;
+
+ // Optional host versions of the xcode config when cross-compiling to iOS.
+ const BuilderRecord* xcode_host_debug;
+ const BuilderRecord* xcode_host_release;
};
GypTargetWriter(const Target* target,
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698