Skip to content

Commit 3f0cf18

Browse files
authored
Allow creation of symlinks for Goma via an environment variable. (flutter#23765)
Setting `FLUTTER_GOMA_CREATE_XCODE_SYMLINKS=1` as an environment variable should achieve the same result as manually specifying the `--xcode-symlinks` flag (which I often forget). This is in keeping with the pattern of setting the `GOMA_DIR` environment variable. The variable has a the `FLUTTER_` prefix because environment variable with the `GOMA_` prefix are reserved for use by Goma and variable unknown to Goma will cause a fatal error.
1 parent 30878af commit 3f0cf18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/gn

+3-2
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ def to_gn_args(args):
243243
gn_args['goma_dir'] = None
244244

245245
if gn_args['use_goma']:
246-
if args.xcode_symlinks:
246+
if args.xcode_symlinks or os.getenv('FLUTTER_GOMA_CREATE_XCODE_SYMLINKS', '0') == '1':
247247
gn_args['create_xcode_symlinks'] = True
248248

249249
# Enable Metal on iOS builds.
@@ -369,7 +369,8 @@ def parse_args(args):
369369
parser.add_argument('--no-goma', dest='goma', action='store_false')
370370
parser.add_argument('--xcode-symlinks', action='store_true', help='Set to true for builds targetting macOS or iOS ' +
371371
'when using goma. If set, symlinks to the Xcode provided sysroot and SDKs will be created in a generated ' +
372-
'folder, which will avoid potential backend errors in Fuchsia RBE.')
372+
'folder, which will avoid potential backend errors in Fuchsia RBE. Instead of specifying the flag on each invocation ' +
373+
'the FLUTTER_GOMA_CREATE_XCODE_SYMLINKS environment variable may be set to 1 to achieve the same effect.')
373374
parser.add_argument('--no-xcode-symlinks', dest='xcode_symlinks', default=False, action='store_false')
374375
parser.add_argument('--depot-tools', default='~/depot_tools', type=str,
375376
help='Depot tools provides an alternative location for gomacc in ' +

0 commit comments

Comments
 (0)