BuildScript))
raise Exception()
- CmdPrefix = Clang + " -cc1 "
+ CmdPrefix = Clang + " --analyze "
- # For now, we assume the preprocessed files should be analyzed
- # with the OS X SDK.
- SDKPath = SATestUtils.getSDKPath("macosx")
- if SDKPath is not None:
- CmdPrefix += "-isysroot " + SDKPath + " "
-
- CmdPrefix += "-analyze -analyzer-output=plist -w "
- CmdPrefix += "-analyzer-checker=" + Checkers
+ CmdPrefix += "--analyzer-output plist "
+ CmdPrefix += " -Xclang -analyzer-checker=" + Checkers
CmdPrefix += " -fcxx-exceptions -fblocks "
- CmdPrefix += " -analyzer-config %s " % generateAnalyzerConfig(Args)
+ CmdPrefix += " -Xclang -analyzer-config -Xclang %s "\
+ % generateAnalyzerConfig(Args)
if (Mode == 2):
CmdPrefix += "-std=c++11 "
import os
-from subprocess import check_output, check_call
+from subprocess import check_call
import sys
return Ext in (".i", ".ii", ".c", ".cpp", ".m", "")
-def getSDKPath(SDKName):
- """
- Get the path to the SDK for the given SDK name. Returns None if
- the path cannot be determined.
- """
- if which("xcrun") is None:
- return None
-
- Cmd = "xcrun --sdk " + SDKName + " --show-sdk-path"
- return check_output(Cmd, shell=True).rstrip()
-
-
def runScript(ScriptPath, PBuildLogFile, Cwd, Stdout=sys.stdout,
Stderr=sys.stderr):
"""