Skip to content

xcode compile_commands generation improvements and issues #434

@diemoschwarz

Description

@diemoschwarz

Hi, this project looks great! I'm trying it on a large 25y+ code base on Mac and of course there are some issues.

But first, I can suggest two improvements to this blog section (that's not on some git repo?):

  1. "the compilation command is repeated twice for some reason": that's because of the intel/arm universal build. One can use these options for a fully specified repeatable generation:
    xcodebuild -arch arm64 -target "mytarget" -project myproject.xcodeproj clean build
    
  2. the sed command to filter out -ivfsstatcache only works for compile_commands.json with one single entry. This is more robust:
    sed -E 's/\-ivfsstatcache [^ ]*\.sdkstatcache//g' 
    

Now I'm stuck at a clang-tidy error: LLVM ERROR: unknown module format
I don't know if this is referring to the compile_commands.json format or to the disabling of the C++ modules features that is mentioned (however I can only find C module options to disable in xcode), or something else. FWIW, here's the compile_commands.json.zip.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions