Skip to content

Error handling response files #915

Open
@mizvekov

Description

@mizvekov

The mrdocs tool has trouble processing response files. This can be observed when processing the compile_commands.json output from a cmake project which relies on them, such as a project containing C++ 20 modules.

error: no such file or directory: '@tools/CMakeFiles/cpe2x.dir/cpe2x.cc.obj.modmap'

The error seems to indicate we are interpreting the response file command line option as a file path, including the leading '@'.

Response files are simple text files composed of multiple lines, each containing a single compiler command line argument.
Their purpose is to avoid hitting implementation limits related to long command lines.

As an example, here are the contents from the above response file:

-fmodule-file=psx.base=psx/CMakeFiles/psx.base.obj.dir/psx.base.pcm
-fmodule-file=std=ext/cxx/CMakeFiles/ext.cxx.obj.dir/std.pcm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions