mirror of
https://github.com/topjohnwu/ondk.git
synced 2025-02-17 02:09:36 +00:00
Ensure proper dlls on Windows
This commit is contained in:
parent
3cd33757b5
commit
1d3eb7b1a3
@ -44,6 +44,14 @@ build() {
|
||||
cp -an ../rust/build/$TRIPLE/llvm/bin/. llvm-bin/.
|
||||
cp -af lib/rustlib/$TRIPLE/bin/rust-lld.exe llvm-bin/lld.exe
|
||||
cp -af ../rust/build/tmp/dist/lib/rustlib/. lib/rustlib/.
|
||||
|
||||
local MINGW_DIR=lib/rustlib/$TRIPLE/bin/self-contained
|
||||
|
||||
# Copy runtime dlls
|
||||
cp_sys_dlls bin/rustc.exe
|
||||
cp_sys_dlls llvm-bin/clang.exe
|
||||
cp_sys_dlls $MINGW_DIR/ld.exe
|
||||
cp_sys_dlls $MINGW_DIR/x86_64-w64-mingw32-gcc.exe
|
||||
cd ..
|
||||
}
|
||||
|
||||
@ -64,7 +72,9 @@ ndk() {
|
||||
cd ndk/toolchains
|
||||
|
||||
local LLVM_DIR=llvm/prebuilt/$NDK_DIRNAME
|
||||
local MINGW_DIR=rust/lib/rustlib/$TRIPLE/bin/self-contained
|
||||
|
||||
# First copy over all runtime dlls
|
||||
cp -af rust/llvm-bin/*.dll $LLVM_DIR/bin
|
||||
|
||||
# Replace files with those from the rust toolchain
|
||||
touch $LLVM_DIR/bin/lld.exe
|
||||
@ -73,12 +83,6 @@ ndk() {
|
||||
ln -sf lld.exe $LLVM_DIR/bin/ld.exe
|
||||
ln -sf lld.exe $LLVM_DIR/bin/ld.lld.exe
|
||||
|
||||
# Copy runtime dlls
|
||||
cp_sys_dlls $LLVM_DIR/bin/clang.exe
|
||||
cp_sys_dlls rust/bin/rustc.exe
|
||||
cp_sys_dlls $MINGW_DIR/ld.exe
|
||||
cp_sys_dlls $MINGW_DIR/x86_64-w64-mingw32-gcc.exe
|
||||
|
||||
cd ../..
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user