Minimal example to run Compiler Explorer with multiple files

I'd like to use compiler explorer to compile (and possibly run) an application with several files and translation units. Then I'd like to be able to explore the generated assembly, as with the single file scenario.

Here is a (non-working) example.

What would be the procedure to do that?


  • There you go: https://godbolt.org/z/s431bE6eY

    You need to tell the CMake configuration the "output.s", in your case this would be the cmake target 'multifile', otherwise it does not know which target to run. You can enter it below the field where you entered the cmake arguments.