Skip to content

Commit 8d2e4a7

Browse files
committed
Added programmer option to compile command
1 parent 5da0399 commit 8d2e4a7

File tree

3 files changed

+43
-30
lines changed

3 files changed

+43
-30
lines changed

cli/compile/compile.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ var (
5050
dryRun bool // Use this flag to now write the output file
5151
libraries []string // List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.
5252
optimizeForDebug bool // Optimize compile output for debug, not for release
53+
programmer string // Use the specified programmer to upload
5354
)
5455

5556
// NewCommand created a new `compile` command
@@ -84,6 +85,7 @@ func NewCommand() *cobra.Command {
8485
command.Flags().StringSliceVar(&libraries, "libraries", []string{},
8586
"List of custom libraries paths separated by commas. Or can be used multiple times for multiple libraries paths.")
8687
command.Flags().BoolVar(&optimizeForDebug, "optimize-for-debug", false, "Optional, optimize compile output for debug, not for release.")
88+
command.Flags().StringVarP(&programmer, "programmer", "P", "", "Optional, use the specified programmer to upload.")
8789

8890
return command
8991
}
@@ -135,6 +137,7 @@ func run(cmd *cobra.Command, args []string) {
135137
Verbose: verbose,
136138
Verify: verify,
137139
ImportDir: exportDir,
140+
Programmer: programmer,
138141
}, os.Stdout, os.Stderr)
139142

140143
if err != nil {

rpc/commands/compile.pb.go

Lines changed: 39 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rpc/commands/compile.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ message CompileReq {
4040
bool optimizeForDebug = 16; // Optimize compile output for debug, not for release.
4141
bool dryRun = 17; // When set to `true` the compiled binary will not be copied to the export directory.
4242
string export_dir = 18; // Optional: save the build artifacts in this directory, the directory must exist.
43+
string programmer = 19; // External programmer for upload
4344
}
4445

4546
message CompileResp {

0 commit comments

Comments
 (0)