|
88 | 88 | '--proxy-to-worker', '--shell-file', '--source-map-base', |
89 | 89 | '--threadprofiler', '--use-preload-plugins' |
90 | 90 | } |
| 91 | +CLANG_FLAGS_WITH_ARGS = { |
| 92 | + '-MT', '-MF', '-MJ', '-MQ', '-D', '-U', '-o', '-x', |
| 93 | + '-Xpreprocessor', '-include', '-imacros', '-idirafter', |
| 94 | + '-iprefix', '-iwithprefix', '-iwithprefixbefore', |
| 95 | + '-isysroot', '-imultilib', '-A', '-isystem', '-iquote', |
| 96 | + '-install_name', '-compatibility_version', '-mllvm', |
| 97 | + '-current_version', '-I', '-L', '-include-pch', |
| 98 | + '-undefined', '-target', '-Xlinker', '-Xclang', '-z' |
| 99 | +} |
91 | 100 |
|
92 | 101 |
|
93 | 102 | @unique |
@@ -218,13 +227,7 @@ def make_relative(filename): |
218 | 227 | if ignore: |
219 | 228 | continue |
220 | 229 |
|
221 | | - if arg in ('-MT', '-MF', '-MJ', '-MQ', '-D', '-U', '-o', '-x', |
222 | | - '-Xpreprocessor', '-include', '-imacros', '-idirafter', |
223 | | - '-iprefix', '-iwithprefix', '-iwithprefixbefore', |
224 | | - '-isysroot', '-imultilib', '-A', '-isystem', '-iquote', |
225 | | - '-install_name', '-compatibility_version', |
226 | | - '-current_version', '-I', '-L', '-include-pch', |
227 | | - '-Xlinker', '-Xclang'): |
| 230 | + if arg in CLANG_FLAGS_WITH_ARGS: |
228 | 231 | ignore_next = True |
229 | 232 |
|
230 | 233 | if arg == '-o': |
@@ -765,14 +768,7 @@ def phase_setup(options, state, newargs): |
765 | 768 | continue |
766 | 769 |
|
767 | 770 | arg = newargs[i] |
768 | | - if arg in {'-MT', '-MF', '-MJ', '-MQ', '-D', '-U', '-o', '-x', |
769 | | - '-Xpreprocessor', '-include', '-imacros', '-idirafter', |
770 | | - '-iprefix', '-iwithprefix', '-iwithprefixbefore', |
771 | | - '-isysroot', '-imultilib', '-A', '-isystem', '-iquote', |
772 | | - '-install_name', '-compatibility_version', |
773 | | - '-current_version', '-I', '-L', '-include-pch', |
774 | | - '-undefined', '-target', |
775 | | - '-Xlinker', '-Xclang', '-z'}: |
| 771 | + if arg in CLANG_FLAGS_WITH_ARGS: |
776 | 772 | skip = True |
777 | 773 |
|
778 | 774 | if not arg.startswith('-'): |
|
0 commit comments