Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8212004

Optional compile_commands.json field not compatible with older libclang

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • infrastructure
    • None
    • b16

      In the JSON Compilation Database specification [1] there is a field "output" that is marked as optional. It was introduced in clang 4.0 [1] - in 3.9 [2] it is not present. Unfortunately, tools that are using older versions of libclang do not ignore this optional field, but instead gives an error message. As it happens, there are HotSpot developers currently using such tools.

      For the "make compile-commands" functionality, this field does not serve any practical purpose, and was populated simply because the information is readily available. In order to improve tool compatibility, we can just stop outputting it.

      [1] http://releases.llvm.org/4.0.0/tools/clang/docs/JSONCompilationDatabase.html
      [2] http://releases.llvm.org/3.9.0/tools/clang/docs/JSONCompilationDatabase.html

            rwestberg Robin Westberg (Inactive)
            rwestberg Robin Westberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: