Running `ninja compiledb` generates much smaller file than `scons compiledb`

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.8.1
    • Component/s: Build
    • None
    • Server Development Platform
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I use VisualStudio Code often and because of this I rely on compile_commands.json.

      When I run ninja compiledb, I get a file of 1.8M:

      [kaloianm@Kaloian's-MacBook-Pro-(Work):~/workspace/mongo]$ ninja compiledb
      [0/1] Building compile_commands.json
      [kaloianm@Kaloian's-MacBook-Pro-(Work):~/workspace/mongo]$ ls -alh compile_commands.json
      -rw-r--r--  1 kaloianm  staff   1.8M Oct 20 08:15 compile_commands.json
      

      When I run scons compiledb, I get a file of 8.4M:

      [kaloianm@Kaloian's-MacBook-Pro-(Work):~/workspace/mongo]$ buildscripts/scons.py --ssl --variables-files=etc/scons/xcode_macosx.vars --libc++ --detect-odr-violations --dbg=on --opt=off --build-tools=next VARIANT_DIR=ninja compiledb
      scons: Reading SConscript files ...
      ...
      scons: done reading SConscript files.
      scons: Building targets ...
      Building compilation database compile_commands.json
      scons: done building targets.
      [kaloianm@Kaloian's-MacBook-Pro-(Work):~/workspace/mongo]$ ls -alh compile_commands.json
      -rw-r--r--  1 kaloianm  staff   8.4M Oct 20 08:19 compile_commands.json
      

            Assignee:
            [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: