Skip to content

Commit

Permalink
Update list of separable and include flags (#596)
Browse files Browse the repository at this point in the history
Fix #591
  • Loading branch information
niosus authored Apr 17, 2019
1 parent b96ba1e commit 182741e
Showing 1 changed file with 91 additions and 64 deletions.
155 changes: 91 additions & 64 deletions plugin/utils/flag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])

0 comments on commit 182741e

Please sign in to comment.