Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-51754

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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 4.8.1
    • Build
    • None
    • Server Development Platform
    • ALL

    Description

      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
      

      Attachments

        Activity

          People

            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: