diff --git a/SConstruct b/SConstruct index e09f0d5a5b..9b25b33783 100755 --- a/SConstruct +++ b/SConstruct @@ -145,7 +145,13 @@ AddOption('--gprof', action='store_true', help='Enable support for the gprof profiler') AddOption('--pprof', action='store_true', help='Enable support for the pprof profiler') -AddOption('--no-duplicate-sources', action='store_false', default=True, +# Default to --no-duplicate-sources, but keep --duplicate-sources to opt-out +# of this new build behaviour in case it introduces regressions. We could use +# action=argparse.BooleanOptionalAction here once Python 3.9 is required. +AddOption('--duplicate-sources', action='store_true', default=False, + dest='duplicate_sources', + help='Create symlinks to sources in the build directory') +AddOption('--no-duplicate-sources', action='store_false', dest='duplicate_sources', help='Do not create symlinks to sources in the build directory')