Skip to content

Commit c64ab27

Browse files
committed
Updated docs
1 parent 602008a commit c64ab27

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: cli/compile/compile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func NewCommand() *cobra.Command {
112112
command.RegisterFlagCompletionFunc("programmer", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
113113
return arguments.GetInstalledProgrammers(), cobra.ShellCompDirectiveDefault
114114
})
115-
command.Flags().BoolVar(&compilationDatabaseOnly, "only-compilation-database", false, tr("Just produce the compilation database, without actually compiling."))
115+
command.Flags().BoolVar(&compilationDatabaseOnly, "only-compilation-database", false, tr("Just produce the compilation database, without actually compiling. All build commands are skipped excecpt all the pre-* hooks."))
116116
command.Flags().BoolVar(&clean, "clean", false, tr("Optional, cleanup the build folder and do not use any cached build."))
117117
// We must use the following syntax for this flag since it's also bound to settings.
118118
// This must be done because the value is set when the binding is accessed from viper. Accessing from cobra would only

Diff for: docs/platform-specification.md

+4
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ recipe.hooks.sketch.prebuild.02.pattern=echo 2
399399
recipe.hooks.sketch.prebuild.11.pattern=echo 11
400400
```
401401

402+
Note: all the `pre*` hooks are executed also to produce the "compilation database" (it's a json file with the list of commands
403+
to run to compile the sketch), instead all the `post*` hooks and all compile commands will be skipped. See the
404+
[`arduino-cli compile`](commands/arduino-cli_compile.md) command for more info.
405+
402406
## Global platform.txt
403407

404408
Properties defined in a platform.txt created in the **hardware** subfolder of the Arduino IDE installation folder will

0 commit comments

Comments
 (0)