diff --git a/plugin/utils/flag.py b/plugin/utils/flag.py index ba2baac3..b409bc6d 100644 --- a/plugin/utils/flag.py +++ b/plugin/utils/flag.py @@ -151,69 +151,96 @@ def build(self): return Flag(self.__prefix, self.__body) # All prefixes that denote includes. - PREFIXES_WITH_PATHS = set(["-isystem", - "-I", - "-isysroot", - "/I", - "-msvc", - "/msvc", - "-B", - "--cuda-path", - "-fmodules-cache-path", - "-fmodules-user-build-path", - "-fplugin", - "-fprebuilt-module-path" - "-fprofile-use", - "-F", - "-idirafter", - "-iframework", - "-iquote", - "-iwithprefix", - "-L", - "-objcmt-whitelist-dir-path", - "--ptxas-path"]) + PREFIXES_WITH_PATHS = set([ + "--cuda-path", + "--ptxas-path" + "-B", + "-cxx-isystem", + "-F", + "-fmodules-cache-path", + "-fmodules-user-build-path", + "-fplugin", + "-fprebuilt-module-path" + "-fprofile-use", + "-I", + "-idirafter", + "-iframework", + "-iframeworkwithsysroot", + "-imacros", + "-include", + "-include-pch", + "-iprefix", + "-iquote", + "-isysroot", + "-isystem", + "-isystem", + "-isystem-after", + "-iwithprefix", + "-iwithprefixbefore", + "-iwithsysroot", + "-L", + "-MF", + "-module-dependency-dir", + "-msvc", + "-o" + "-objcmt-whitelist-dir-path", + "/cxx-isystem", + "/I", + "/msvc", + ]) # Generated from `clang -help` with regex: ([-/][\w-]+)\s\<\w+\>\s - SEPARABLE_PREFIXES = set(["-arcmt-migrate-report-output", - "-cxx-isystem", - "-dependency-dot", - "-dependency-file", - "-fmodules-user-build-path", - "-F", - "-idirafter", - "-iframework", - "-imacros", - "-include-pch", - "-include", - "-iprefix", - "-iquote", - "-isysroot", - "-isystem", - "-ivfsoverlay", - "-iwithprefixbefore", - "-iwithprefix", - "-iwithsysroot", - "-I", - "-meabi", - "-MF", - "-mllvm", - "-Xclang", - "-module-dependency-dir", - "-MQ", - "-mthread-model", - "-MT", - "-o", - "-serialize-diagnostics", - "-working-directory", - "-Xanalyzer", - "-Xassembler", - "-Xlinker", - "-Xpreprocessor", - "-x", - "-z", - "/FI", - "/I", - "/link", - "/Tc", - "/Tp", - "/U"]) + SEPARABLE_PREFIXES = set([ + "--analyzer-output", + "--config", + "-arcmt-migrate-report-output", + "-cxx-isystem", + "-dependency-dot", + "-dependency-file", + "-F", + "-fmodules-cache-path", + "-fmodules-user-build-path", + "-I", + "-idirafter", + "-iframework", + "-imacros", + "-include", + "-include-pch", + "-iprefix", + "-iquote", + "-isysroot", + "-isystem", + "-ivfsoverlay", + "-iwithprefix", + "-iwithprefixbefore", + "-iwithsysroot", + "-meabi", + "-MF", + "-MJ", + "-mllvm", + "-module-dependency-dir", + "-MQ", + "-MT", + "-mthread-model", + "-o", + "-serialize-diagnostics", + "-T", + "-Tbss", + "-Tdata", + "-Ttext", + "-working-directory", + "-x", + "-Xanalyzer", + "-Xassembler", + "-Xclang", + "-Xlinker", + "-Xopenmp-target", + "-Xpreprocessor", + "-z", + "/FI", + "/I", + "/link", + "/Tc", + "/Tp", + "/U" + ])