You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for compile_command.json output (#1081)
* Draft: Support generating a compile_commands.json file
This is still very rough and unfinished.
* Added compile flag to produce only the compilation database
* Save compilation database inside build path
* Removed 'Writing compilation database...' message
Also slightly refactore code
* Added missing (c) header
* Renamed some functions, did some small cleanups
* compilation database: made some fields public
* compilation database: added LoadCompilationDatabase method
* Added unit tests for compilation_database
Co-authored-by: Matthijs Kooijman <[email protected]>
"List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.")
95
96
command.Flags().BoolVar(&optimizeForDebug, "optimize-for-debug", false, "Optional, optimize compile output for debugging, rather than for release.")
96
97
command.Flags().StringVarP(&programmer, "programmer", "P", "", "Optional, use the specified programmer to upload.")
98
+
command.Flags().BoolVar(&compilationDatabaseOnly, "only-compilation-database", false, "Just produce the compilation database, without actually compiling.")
97
99
command.Flags().BoolVar(&clean, "clean", false, "Optional, cleanup the build folder and do not use any cached build.")
98
100
// We must use the following syntax for this flag since it's also bound to settings, we could use the other one too
99
101
// but it wouldn't make sense since we still must explicitly set the exportBinaries variable by reading from settings.
0 commit comments