本文整理匯總了Python中clang_helpers.PrepareClangFlags.extend方法的典型用法代碼示例。如果您正苦於以下問題:Python PrepareClangFlags.extend方法的具體用法?Python PrepareClangFlags.extend怎麽用?Python PrepareClangFlags.extend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類clang_helpers.PrepareClangFlags
的用法示例。
在下文中一共展示了PrepareClangFlags.extend方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: FlagsForFile
# 需要導入模塊: from clang_helpers import PrepareClangFlags [as 別名]
# 或者: from clang_helpers.PrepareClangFlags import extend [as 別名]
def FlagsForFile(filename):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = database.GetCompilationInfoForFile(filename)
final_flags = PrepareClangFlags(
MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_),
filename)
relative_to = DirectoryOfThisScript()
final_flags.extend(MakeRelativePathsInFlagsAbsolute(flags, relative_to))
else:
relative_to = DirectoryOfThisScript()
final_flags = MakeRelativePathsInFlagsAbsolute(flags, relative_to)
return {
'flags': final_flags,
'do_cache': True}