Skip to content

Commit

Permalink
[build-script] Add SWIFT_ prefix to USE_SCCACHE env var
Browse files Browse the repository at this point in the history
  • Loading branch information
porglezomp committed Sep 30, 2020
1 parent e01893c commit 6d92486
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/DevelopmentTips.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $ sccache --start-server
$ ./swift/utils/build-script MY_ARGS --sccache
```

If you want to always use sccache, you can `export USE_SCCACHE=1` and the build script will pick it up.
If you want to always use sccache, you can `export SWIFT_USE_SCCACHE=1` and the build script will pick it up.

Given the size of artifacts generated, you might also want to bump the cache size from the default 10GB to something larger, say by putting `export SCCACHE_CACHE_SIZE="50G"` in your dotfile(s).

Expand Down
2 changes: 1 addition & 1 deletion utils/build-script
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ def parse_preset_args():
help="use sccache",
action=argparse.actions.StoreTrueAction,
nargs=argparse.Nargs.OPTIONAL,
default=os.environ.get('USE_SCCACHE') == '1')
default=os.environ.get('SWIFT_USE_SCCACHE') == '1')
parser.add_argument(
"--cmake-c-launcher",
help="the absolute path to set CMAKE_C_COMPILER_LAUNCHER",
Expand Down
2 changes: 1 addition & 1 deletion utils/build_swift/build_swift/driver_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def create_argument_parser():
default=os.environ.get('USE_DISTCC') == '1',
help='use distcc in pump mode')
option('--sccache', toggle_true,
default=os.environ.get('USE_SCCACHE') == '1',
default=os.environ.get('SWIFT_USE_SCCACHE') == '1',
help='use sccache')
option('--enable-asan', toggle_true,
help='enable Address Sanitizer')
Expand Down

0 comments on commit 6d92486

Please sign in to comment.