Add support for multiple configuration to Xcode project generator
Add two flags `--xcode-configs` and `--xcode-config-build-dir` that
allow generating an Xcode project supporting multiple configurations.
This will speed up the generation of the Xcode project used by the
Chromium project by removing the need to use a script that modify
the project generated by gn.
Bug: chromium:1331345
Change-Id: Ifb5e652ba60f1a5228e9eddda8b2cdd83b82aac9
Reviewed-on: https://gn-review.googlesource.com/c/gn/+/14142
Reviewed-by: Brett Wilson <[email protected]>
Commit-Queue: Sylvain Defresne <[email protected]>
diff --git a/docs/reference.md b/docs/reference.md
index 6ffec1d..084398d 100644
--- a/docs/reference.md
+++ b/docs/reference.md
@@ -828,6 +828,23 @@
"legacy" - Legacy Build system
"new" - New Build System
+ --xcode-configs=<config_name_list>
+ Configure the list of build configuration supported by the generated
+ project. If specified, must be a list of semicolon-separated strings.
+ If ommitted, a single configuration will be used in the generated
+ project derived from the build directory.
+
+ --xcode-config-build-dir=<string>
+ If present, must be a path relative to the source directory. It will
+ default to $root_out_dir if ommitted. The path is assumed to point to
+ the directory where ninja needs to be invoked. This variable can be
+ used to build for multiple configuration / platform / environment from
+ the same generated Xcode project (assuming that the user has created a
+ gn build directory with the correct args.gn for each).
+
+ One useful value is to use Xcode variables such as '${CONFIGURATION}'
+ or '${EFFECTIVE_PLATFORM}'.
+
--ninja-executable=<string>
Can be used to specify the ninja executable to use when building.