buildRustCrate: fix #78412
`build.rs` files might create files. Those files are supposed to go into `OUT_DIR` (envirionment variable) and not be overlayed onto the source tree.
This commit is contained in:
parent
19698d15ce
commit
a57d0fe0bb
|
@ -137,16 +137,7 @@ in ''
|
||||||
CRATENAME=$(echo ${crateName} | sed -e "s/\(.*\)-sys$/\U\1/")
|
CRATENAME=$(echo ${crateName} | sed -e "s/\(.*\)-sys$/\U\1/")
|
||||||
grep -P "^cargo:(?!(rustc-|warning=|rerun-if-changed=|rerun-if-env-changed))" target/build/${crateName}.opt \
|
grep -P "^cargo:(?!(rustc-|warning=|rerun-if-changed=|rerun-if-env-changed))" target/build/${crateName}.opt \
|
||||||
| sed -e "s/cargo:\([^=]*\)=\(.*\)/export DEP_$(echo $CRATENAME)_\U\1\E=\2/" > target/env
|
| sed -e "s/cargo:\([^=]*\)=\(.*\)/export DEP_$(echo $CRATENAME)_\U\1\E=\2/" > target/env
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
if [[ -n "$(ls target/build/${crateName}.out)" ]]; then
|
|
||||||
|
|
||||||
if [[ -e "${libPath}" ]]; then
|
|
||||||
cp -r target/build/${crateName}.out/* $(dirname ${libPath}) #*/
|
|
||||||
else
|
|
||||||
cp -r target/build/${crateName}.out/* src #*/
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
runHook postConfigure
|
runHook postConfigure
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in New Issue