oclint: Xcode14.3,OCLint: 20.11 oclint: error: compilation contains multiple jobs:
Issue Summary
oclint: error: compilation contains multiple jobs:
Environment
- Operation system name and version: Mac OS:13.3 (22E252), Xcode 14.3
- OCLint version: /bin/oclint-20.11
- How OCLint is installed: local build? prebuilt binary downloaded from github? homebrew install? others?
Reproduction Steps
Running OCLint… oclint: error: compilation contains multiple jobs: “/usr/local/Cellar/oclint/20.11/bin/oclint-20.11” “-cc1” “-triple” “arm64-apple-ios11.0.0” “-Wundef-prefix=TARGET_OS_” “-Werror=undef-prefix” “-Wdeprecated-objc-isa-usage” “-Werror=deprecated-objc-isa-usage” “-Werror=implicit-function-declaration” “-fsyntax-only” “-disable-free” “-disable-llvm-verifier” “-discard-value-names” “-main-file-name” “iphoneos16.4-20E238-.sdkstatcache” “-mrelocation-model” “pic” “-pic-level” “2” “-mframe-pointer=non-leaf” “-fno-rounding-math” “-munwind-tables” “-target-sdk-version=16.4” "-fcompatibility-qualified-id-
Sample code
C
C++
Objective-C
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 22
Comparing Xcode 14.2 vs Xcode 14.3 oclint-json-compilation-database output yields some differences. In my case, Xcode 14.3 sometimes issues an extra argument over XCode 14.2: -ivfsstatcache XXXXXXX.sdkstatcache
Using sed to strip this out of the xcpretty json output before feeding to oclint-json-compilation-database resolves the issue.
sed ‘s/-ivfsstatcache [^ ]*//g’ < compile_commands.json > icompile_commands.json mv icompile_commands.json compile_commands.json