including mbed revision number in generated c++

This commit is contained in:
Peli de Halleux 2015-07-22 14:38:52 -07:00
Родитель 8d627ec057
Коммит 6268094b3f
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -11,6 +11,7 @@ module TDev {
import H = Helpers
export var mbedRuntimeRevision = "5:813626068edc"
// Assuming all library references have been resolved, compile either the
// main app or one of said libraries.
function compile1(libs: J.JApp[], a: J.JApp): { prototypes: string; code: string; prelude: string; libName: string } {
@ -44,7 +45,8 @@ module TDev {
return Promise.join(textPromises).then((everything: J.JApp[]) => {
var compiled = everything.map((a: J.JApp) => compile1(everything, a));
return Promise.as(
compiled.map(x => x.prelude)
["// mbed library revision:" + Embedded.mbedRuntimeRevision]
.concat(compiled.map(x => x.prelude))
.concat(compiled.map(x => x.prototypes))
.concat(compiled.map(x => x.code))
.filter(x => x != "")