Merge pull request #317755 from thehabbos007/master
BuildRustCrate: proc macros must be built for build's platform
This commit is contained in:
commit
c5d75bb7f6
@ -49,6 +49,8 @@ let
|
||||
filename =
|
||||
if lib.any (x: x == "lib" || x == "rlib") dep.crateType
|
||||
then "${dep.metadata}.rlib"
|
||||
# Adjust lib filename for crates of type proc-macro. Proc macros are compiled/run on the build platform architecture.
|
||||
else if (lib.attrByPath [ "procMacro" ] false dep) then "${dep.metadata}${stdenv.buildPlatform.extensions.library}"
|
||||
else "${dep.metadata}${stdenv.hostPlatform.extensions.library}";
|
||||
in
|
||||
" --extern ${opts}${name}=${dep.lib}/lib/lib${extern}-${filename}"
|
||||
|
Loading…
Reference in New Issue
Block a user