@@ -575,7 +575,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
575
575
" NM" => " $(host_target) -nm" ,
576
576
" OBJC" => " $(host_target) -cc" ,
577
577
" RANLIB" => " $(host_target) -ranlib" ,
578
- # Needed to find pkg-config files for the host: https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine
578
+ # Needed to find pkg-config files for the host: https://mesonbuild.com/Reference-tables.html#environment-variables-per-machine
579
579
" PKG_CONFIG_PATH_FOR_BUILD" => " $(host_prefix) /lib/pkgconfig:$(host_prefix) /lib64/pkgconfig:$(host_prefix) /share/pkgconfig" ,
580
580
)
581
581
wrapper (io, " /usr/bin/meson" ; allow_ccache= false , env= meson_env)
@@ -889,6 +889,9 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
889
889
PS1 = raw " sandbox:${PWD//$WORKSPACE/$\{ WORKSPACE\} } $ "
890
890
end
891
891
892
+ # Number of parallel jobs to use for builds
893
+ nproc = " $(get (ENV , " BINARYBUILDER_NPROC" , Sys. CPU_THREADS)) "
894
+
892
895
# Base mappings
893
896
mapping = Dict (
894
897
# Platform information (we save a `bb_target` because sometimes `target` gets
@@ -899,7 +902,7 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
899
902
" bb_full_target" => triplet (platform),
900
903
" rust_target" => map_rust_target (platform),
901
904
" rust_host" => map_rust_target (host_platform),
902
- " nproc" => " $( get ( ENV , " BINARYBUILDER_NPROC " , Sys . CPU_THREADS)) " ,
905
+ " nproc" => nproc ,
903
906
" nbits" => string (nbits (platform)),
904
907
" proc_family" => string (proc_family (platform)),
905
908
" dlext" => platform_dlext (platform),
@@ -950,7 +953,6 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
950
953
end
951
954
end
952
955
953
-
954
956
# Go stuff
955
957
if :go in compilers
956
958
merge! (mapping, Dict (
@@ -966,6 +968,7 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
966
968
merge! (mapping, Dict (
967
969
" RUSTC" => " rustc" ,
968
970
" CARGO" => " cargo" ,
971
+ " CARGO_BUILD_JOBS" => nproc,
969
972
" CARGO_BUILD_TARGET" => map_rust_target (platform),
970
973
" CARGO_HOME" => " /opt/$(host_target) " ,
971
974
" RUSTUP_HOME" => " /opt/$(host_target) " ,
0 commit comments