53b6e1a3c5
Our `rustc.nix` adds a `--target` flag for the host when doing a host!=target build, but neglects to add a `--target` flag for the buildPlatform when doing a build!=(host==target) build. This commit corrects that. Before rustc 1.68 omitting the --target flag for the buildPlatform did not cause any problems. As of rustc 1.68, build!=host without a --target for the build will fail like below (with hundreds more "cannot find std::" errors. ``` $ nix build -f . -L pkgsCross.aarch64-multiplatform.rustc ... Copying stage1 library from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-gnu) Uplifting stage1 library (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-gnu) Copying stage2 library from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-gnu) Building stage2 tool rust-analyzer-proc-macro-srv (aarch64-unknown-linux-gnu) Compiling autocfg v1.1.0 Compiling libc v0.2.135 Compiling cfg-if v1.0.0 Compiling proc-macro2 v1.0.47 Compiling quote v1.0.21 Compiling unicode-ident v1.0.5 Compiling syn v1.0.102 Compiling once_cell v1.15.0 Compiling parking_lot_core v0.9.4 Compiling serde_derive v1.0.145 Compiling hashbrown v0.12.3 Compiling scopeguard v1.1.0 Compiling smallvec v1.10.0 Compiling log v0.4.17 Compiling serde v1.0.145 Compiling rustc-hash v1.1.0 error[E0463]: can't find crate for `std` error: cannot find macro `println` in this scope --> /nix/tmp/nix-build-rustc-aarch64-unknown-linux-gnu-1.68.2.drv-0/rustc-1.68.2-src/vendor/libc-0.2.135/build.rs:7:5 | 7 | println!("cargo:rerun-if-changed=build.rs"); | ^^^^^^^ error: cannot find macro `println` in this scope --> /nix/tmp/nix-build-rustc-aarch64-unknown-linux-gnu-1.68.2.drv-0/rustc-1.68.2-src/vendor/libc-0.2.135/build.rs:16:9 | 16 | println!( | ^^^^^^^ error: cannot find macro `println` in this scope --> /nix/tmp/nix-build-rustc-aarch64-unknown-linux-gnu-1.68.2.drv-0/rustc-1.68.2-src/vendor/libc-0.2.135/build.rs:29:13 | 29 | println!("cargo:rustc-cfg=freebsd10") | ^^^^^^^ ``` |
||
---|---|---|
.. | ||
4th | ||
abcl | ||
acme | ||
adoptopenjdk-bin | ||
adoptopenjdk-icedtea-web | ||
alan | ||
algol68g | ||
ante | ||
apache-flex-sdk | ||
arachne-pnr | ||
armips | ||
as31 | ||
asl | ||
asn1c | ||
aspectj | ||
atasm | ||
ats | ||
ats2 | ||
avra | ||
ballerina | ||
bigloo | ||
binaryen | ||
blueprint | ||
bluespec | ||
bs-platform | ||
bupc | ||
c3c | ||
cakelisp | ||
carp | ||
cc65 | ||
ccl | ||
chez | ||
chez-racket | ||
chicken | ||
ciao | ||
circt | ||
clasp | ||
clean | ||
closure | ||
cmdstan | ||
cmucl | ||
codon | ||
colm | ||
computecpp | ||
cone | ||
copper | ||
crystal | ||
crystal2nix | ||
cudatoolkit | ||
dale | ||
dart | ||
dasm | ||
dev86 | ||
dictu | ||
dmd | ||
dotnet | ||
dtc | ||
ecl | ||
edk2 | ||
eli | ||
elm | ||
emscripten | ||
eql | ||
factor-lang | ||
fasm | ||
fasmg | ||
fbc | ||
firrtl | ||
flasm | ||
flutter | ||
flux | ||
fpc | ||
fsharp | ||
fstar | ||
gambit | ||
gavrasm | ||
gbforth | ||
gcc | ||
gcc-arm-embedded | ||
gcl | ||
gerbil | ||
gforth | ||
ghc | ||
ghcjs | ||
ghdl | ||
gleam | ||
glslang | ||
gmqcc | ||
gnat-bootstrap | ||
gnostic | ||
gnu-cim | ||
gnu-cobol | ||
gnu-smalltalk | ||
go | ||
go-jsonnet | ||
gprolog | ||
graalvm/community-edition | ||
gwt | ||
halide | ||
hare | ||
haxe | ||
heptagon | ||
hip | ||
hip-common | ||
hipcc | ||
hipify | ||
hop | ||
hvm | ||
idris2 | ||
inform6 | ||
inform7 | ||
inklecate | ||
intel-graphics-compiler | ||
intercal | ||
ios-cross-compile | ||
ispc | ||
jasmin | ||
jasmin-compiler | ||
javacard-devkit | ||
jetbrains-jdk | ||
jrsonnet | ||
jsonnet | ||
julia | ||
juniper | ||
jwasm | ||
kaitai-struct-compiler | ||
kind2 | ||
koka | ||
kotlin | ||
ldc | ||
lesscpy | ||
ligo | ||
lingua-franca | ||
llvm | ||
lobster | ||
manticore | ||
marst | ||
matter-compiler | ||
mcpp | ||
mercury | ||
meta-environment/meta-build-env | ||
mezzo | ||
microscheme | ||
minimacy | ||
mint | ||
miranda | ||
mit-scheme | ||
mkcl | ||
mlkit | ||
mlton | ||
mono | ||
mosml | ||
mozart | ||
mruby | ||
mrustc | ||
muonlang | ||
myrddin | ||
nasm | ||
neko | ||
nextpnr | ||
nim | ||
nqc | ||
nvidia-cg-toolkit | ||
obliv-c | ||
ocaml | ||
odin | ||
open-watcom | ||
opendylan | ||
openjdk | ||
openspin | ||
ophis | ||
oraclejdk | ||
orc | ||
osl | ||
owl-lisp | ||
p4c | ||
paco | ||
pakcs | ||
passerine | ||
pforth | ||
picat | ||
polyml | ||
ponyc | ||
purescript | ||
qbe | ||
rasm | ||
reason | ||
rgbds | ||
rml | ||
roslyn | ||
rust | ||
sagittarius-scheme | ||
sbcl | ||
scala | ||
scala-runners | ||
scryer-prolog | ||
sdcc | ||
seexpr | ||
semeru-bin | ||
serpent | ||
shaderc | ||
silice | ||
sjasmplus | ||
smlnj | ||
solc | ||
souffle | ||
spasm-ng | ||
spirv-llvm-translator | ||
squeak | ||
stalin | ||
stanc | ||
swi-prolog | ||
swift | ||
temurin-bin | ||
terra | ||
teyjus | ||
tinycc | ||
tinygo | ||
tvm | ||
uasm | ||
unison | ||
urn | ||
urweb | ||
vala | ||
vlang | ||
vyper | ||
wcc | ||
wla-dx | ||
x11basic | ||
xa | ||
yap | ||
yasm | ||
yosys | ||
z88dk | ||
zasm | ||
zig | ||
zulu | ||
zz |