Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Proposal: Add local option from compile commands #10

Open
siedentop opened this issue Jul 14, 2019 · 1 comment
Open

Proposal: Add local option from compile commands #10

siedentop opened this issue Jul 14, 2019 · 1 comment

Comments

@siedentop
Copy link
Contributor

Hi @ethanhs,

for myself, implemented in Python, I wrote a little script to open a C++ source file on a locally running instance of Compiler Explorer. The benefit is that you can use Compiler Explorer on a real source file of a real project. All flags will be passed to CE, so the resulting assembly is the same as in the project.

I would like to know whether you would like to see this as part of cce. Would you accept a patch to that effect?

How does it work?

Prerequisite:

  1. A local instance of compiler explorer is running. (Clone CE and run make).
  2. A compile_commands.json file exists in one of the parent directories of the target file.
  3. The target file can be in any language supported by CE and compile_commands.

Usage:

  1. Given some source file of interest (myfile.cc), call cce myfile.cc.
  2. The default browser is opened with a new tab, with myfile loaded in Compiler Explorer. The compile flags will be set correctly. This means you can open files that are part of a much bigger project and see the assembly output.

If this sounds like something you would like to see in CCE, please let me know and I'll prepare a new version in Rust.

@ethanhs
Copy link
Owner

ethanhs commented Jul 14, 2019

I think this could be handy. I've been meaning to set up my own CE instance, but haven't gotten around to it, so sure, I think I'd accept this!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants