Why does cargo recompile a second time? Is this an error in some package, like memchr?
Can I trust the first build to be the same as the second?
build.sh is just a call to RUSTFLAGS="-C linker=arm-linux-gnueabihf-gcc" cargo build --release --target armv7-unknown-linux-gnueabihf --manifest-path init_pi/Cargo.toml
Could it have something to do with having to specify the linker, even though I have specified the target? Not sure why target type is not enough.
$ ./build.sh
Compiling memchr v2.3.3
Compiling lazy_static v1.4.0
Compiling regex-syntax v0.6.18
Compiling json v0.12.4
Compiling thread_local v1.0.1
Compiling aho-corasick v0.7.13
Compiling regex v1.3.9
Compiling init_pi v0.1.0 (.../init_pi)
Finished release [optimized] target(s) in 10.61s
$ ./build.sh
Compiling memchr v2.3.3
Compiling aho-corasick v0.7.13
Compiling regex v1.3.9
Compiling init_pi v0.1.0 (.../init_pi)
Finished release [optimized] target(s) in 8.24s
$ ./build.sh
Finished release [optimized] target(s) in 0.15s