{"id":27306498,"url":"https://github.com/pseyfert/compile_commands_json_executer","last_synced_at":"2025-06-17T04:37:12.343Z","repository":{"id":57610609,"uuid":"198776370","full_name":"pseyfert/compile_commands_json_executer","owner":"pseyfert","description":"execute compilation commands from a compile_commands.json db with small modifications","archived":false,"fork":false,"pushed_at":"2020-04-24T11:50:08.000Z","size":33,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T04:00:03.043Z","etag":null,"topics":["compile-commands-json","compiler-launcher"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pseyfert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-25T07:02:20.000Z","updated_at":"2020-04-24T11:50:11.000Z","dependencies_parsed_at":"2022-09-05T21:31:52.587Z","dependency_job_id":null,"html_url":"https://github.com/pseyfert/compile_commands_json_executer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Fcompile_commands_json_executer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Fcompile_commands_json_executer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Fcompile_commands_json_executer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pseyfert%2Fcompile_commands_json_executer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pseyfert","download_url":"https://codeload.github.com/pseyfert/compile_commands_json_executer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514224,"owners_count":21116901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compile-commands-json","compiler-launcher"],"created_at":"2025-04-12T04:00:06.261Z","updated_at":"2025-04-12T04:00:06.916Z","avatar_url":"https://github.com/pseyfert.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"This tool shall enable a user to run compilation commands from a\ncompile_commands.json file without messing with the original build tool.\n\nApplications may be:\n\n - using a different compiler (e.g. clang++ instead of g++)\n```\ngo run github.com/pseyfert/compile_commands_json_executer --cmd /path/to/clang++\n```\n\n - add compiler arguments\n```\ngo run github.com/pseyfert/compile_commands_json_executer --cmd /path/to/clang++ --extra-arg=--gcc-toolchain=--gcc-toolchain=/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/7.3.0/x86_64-centos7\n```\n\n - run other clang tools (kythe, include-what-you-use)\n```\ngo run github.com/pseyfert/compile_commands_json_executer --cmd /opt/kythe/extractors/cxx_extractor --env LD_LIBRARY_PATH=/cvmfs/lhcb.cern.ch/lib/lcg/releases/clang/8.0.0/x86_64-centos7/lib64:/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0/x86_64-centos7/lib64:/cvmfs/lhcb.cern.ch/lib/lcg/releases/binutils/2.30/x86_64-centos7/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} --extra-arg=--gcc-toolchain=/cvmfs/lhcb.cern.ch/lib/lcg/releases/gcc/8.2.0/x86_64-centos7\n```\n\n - or just disable compilation and only run preprocessors\n```\ngo run github.com/pseyfert/compile_commands_json_executer --remove-filter='-c' --append='-E'\n```\n\n## what's there and what isn't\n\n### what's there\n\n - concurrency: `-j 4` to run with 4 thread\n - relative path handling: the working directory of the compiler call shall be the one specified in the compilation database. Relative paths therein should just work.\n - limitted compiler launcher tool detection: when using a compiler launcher in the database like `ccache g++`, the combination of them is detected as \"executable\". It won't be replaced to `cxx_extractor g++` but instead to `cxx_extractor`.\n - many arguments can occur repeatedly, such as `--extra-arg` and `--extra-arg-before` to add multiple arguments (they maintain the order in which they appear, i.e. the first `--extra-arg-before` will be the first argument)\n - `--trace` will write a json file that can be opened with the chrome webbrowser on the `chrome://tracing` page to visualize which processes launch when.\n - see also the output of `--help`\n\n### what's not there\n\n - multi word argument treatment: file name replacements for output files (e.g. `-o /some/outfile` or `-MF /some/other`) can not be done as the `replace` and `remove-filter` options go through the command line word by word and can't jump over the space after `-o`\n - compiler launchers for the replacement executable (i.e. `--cmd=\"ccache clang++\"` won't work). But they can be worked around with `--cmd=\"ccache\" --extra-arg-before \"clang++\"`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseyfert%2Fcompile_commands_json_executer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpseyfert%2Fcompile_commands_json_executer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpseyfert%2Fcompile_commands_json_executer/lists"}