I was trying to build thumbv7a-pc-windows-msvc target with rust/master, with a few local patches, e.g. no panic_abort instead of panic_unwind, I was able to build stage 0/1/2 locally without issue, this is the command I used,
c:\python27\python.exe x.py build --host x86_64-pc-windows-msvc --build x86_64-pc-windows-msvc --target thumbv7a-pc-windows-msvc
After the build, I copied cargo from stage0\bin into stage1\bin, then copied everything from stage2 into stage1 and overwrote everything with same name, then I used cargo and rustc from stage1 as the toolchain, to build my own thumbv7a projects, so far so good, however, I got error complaining about unresolved external symbols like below. I checked the symbol is from rust\liballoc\collections\btree\node.js, it should be available in my local toolchain I just built, unless I made mistake when I merged artifacts from all stages.
libstd-67da064321eabc9f.rlib(std-67da064321eabc9f.std.38mh430v-cgu.5.rcgu.o) : error LNK2019: unresolved external symbol __imp__ZN5alloc11collections5btree4node15EMPTY_ROOT_NODE17h486b4088caeaa846E referenced in function _ZN3std3sys7windows7process7Command3new17hc990fb56302414eaE
libstd-67da064321eabc9f.rlib(std-67da064321eabc9f.std.38mh430v-cgu.12.rcgu.o) : error LNK2001: unresolved external symbol __imp__ZN5alloc11collections5btree4node15EMPTY_ROOT_NODE17h486b4088caeaa846E
libstd-67da064321eabc9f.rlib(std-67da064321eabc9f.std.38mh430v-cgu.14.rcgu.o) : error LNK2001: unresolved external symbol __imp__ZN5alloc11collections5btree4node15EMPTY_ROOT_NODE17h486b4088caeaa846E
libstd-67da064321eabc9f.rlib(std-67da064321eabc9f.std.38mh430v-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol __imp__ZN5alloc11collections5btree4node15EMPTY_ROOT_NODE17h486b4088caeaa846E
D:\git\iotedge\edgelet\target\thumbv7a-pc-windows-msvc\release\deps\iotedged_eventlog_messages.dll : fatal error LNK1120: 1 unresolved externals
According to how to build and run, should I use stage2\bin\rustc.exe along with all artifacts from stage1, instead of overwriting everything in stage1 (by stage2)?
This stage2/bin/rustc compiler is shipped to end-users, along with the stage 1 {std,test,rustc} artifacts.