Comparing version 0.31.0 to 0.32.0
@@ -96,3 +96,4 @@ "use strict"; | ||
.option("--no-colors", "disable color output") | ||
.option("--debug", "enable debug output from PXT"); | ||
.option("--debug", "enable debug output from PXT") | ||
.option("-f, --compile-flags <flag,...>", "set PXT compiler options (?compile=... or PXT_COMPILE_SWITCHES=... in other tools)"); | ||
return cmd; | ||
@@ -170,2 +171,9 @@ } | ||
prj.service.runSync("(() => { pxt.options.debug = 1 })()"); | ||
if (opts.compileFlags) { | ||
prj.service.runSync(`(() => { | ||
pxt.setCompileSwitches(${JSON.stringify(opts.compileFlags)}); | ||
if (pxt.appTarget.compile.switches.asmdebug) | ||
ts.pxtc.assembler.debug = 1 | ||
})()`); | ||
} | ||
prj.writePxtModules = !!opts.pxtModules; | ||
@@ -172,0 +180,0 @@ if (opts.linkPxtModules) { |
{ | ||
"name": "makecode", | ||
"version": "0.31.0", | ||
"version": "0.32.0", | ||
"description": "MakeCode (PXT) - web-cached build tool", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -213,2 +213,17 @@ # MKC - command line tool for MakeCode editors | ||
## Compile switches | ||
Options can be passed to PXT compiler using `--compile-flags` (`-f`) option: | ||
``` | ||
mkc -f size # generate .csv file with function sizes | ||
mkc -f asmdebug # generate more comments in assembly listing | ||
mkc -f profile # enable profiling counters | ||
mkc -f rawELF # don't generate .UF2 but a raw ELF file | ||
mkc -f size,asmdebug # example with two options | ||
``` | ||
The same options (except for `asmdebug`) can be passed to website with `?compiler=...` or `?compile=...` argument | ||
and to the regular `pxt` command line utility with `PXT_COMPILE_SWITCHES=...`. | ||
## Local development | ||
@@ -215,0 +230,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
211283
3200
269