diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-10-08 17:43:02 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-10-08 17:43:02 +0000 |
commit | 53e758b09c8b777a74dcb7a080de56548e59d628 (patch) | |
tree | 1718c1e320860e4d2794f651727d970799fef507 /lldb/utils/sync-source/syncsource.py | |
parent | b6776e0d0707c0ff3ef89ee9d1783d569a79870a (diff) | |
download | bcm5719-llvm-53e758b09c8b777a74dcb7a080de56548e59d628.tar.gz bcm5719-llvm-53e758b09c8b777a74dcb7a080de56548e59d628.zip |
syncsource.py: a specific dir's source_excludes may now include the special entry "<no-defaults>".
The <no-defaults> special entry will prevent that specific directory's excludes from
receiving the global default source excludes. This allows overriding the global default
in a specific instance, simplifying the syntax for that case.
llvm-svn: 249705
Diffstat (limited to 'lldb/utils/sync-source/syncsource.py')
-rw-r--r-- | lldb/utils/sync-source/syncsource.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/utils/sync-source/syncsource.py b/lldb/utils/sync-source/syncsource.py index a9e09b04890..409d72c3087 100644 --- a/lldb/utils/sync-source/syncsource.py +++ b/lldb/utils/sync-source/syncsource.py @@ -203,9 +203,18 @@ def sync_configured_sources(options, configuration, default_excludes): # If excludes are specified for this dir_id, then pass along # the excludes. These are relative to the dir_id directory # source, and get passed along that way as well. - transfer_source_excludes = list(default_excludes) + transfer_source_excludes = [] + + # Add the source excludes for this dir. + skip_defaults = False if source_excludes and dir_key in source_excludes: transfer_source_excludes.extend(source_excludes[dir_key]) + if "<no-defaults>" in source_excludes[dir_key]: + skip_defaults = True + transfer_source_excludes.remove("<no-defaults>") + + if not skip_defaults and default_excludes is not None: + transfer_source_excludes.extend(list(default_excludes)) # Build the destination-base-relative dest dir into which # we'll be syncing. Relative directory defaults to the |