From cc9dd95642bfea62dea2f75c23a8c5b2aed54611 Mon Sep 17 00:00:00 2001 From: Gnimuc Date: Sun, 10 Mar 2019 14:11:57 +0800 Subject: [PATCH] Workaround for Windows ABI mismatch ref: JuliaPackaging/BinaryProvider.jl#152 --- deps/build_libcxxffi.jl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deps/build_libcxxffi.jl b/deps/build_libcxxffi.jl index 13cd53c9..97a4e1e9 100644 --- a/deps/build_libcxxffi.jl +++ b/deps/build_libcxxffi.jl @@ -17,7 +17,11 @@ download_info = Dict( # Install unsatisfied or updated dependencies: unsatisfied = any(!satisfied(p; verbose=verbose) for p in products) -dl_info = choose_download(download_info, platform_key_abi()) +@static if Sys.iswindows() + dl_info = download_info[Windows(Sys.WORD_SIZE == 64 ? :x86_64 : :i686, compiler_abi=CompilerABI(:gcc7))] +else + dl_info = choose_download(download_info, platform_key_abi()) +end if dl_info === nothing && unsatisfied # If we don't have a compatible .tar.gz to download, complain. # Alternatively, you could attempt to install from a separate provider, @@ -29,5 +33,9 @@ end # trying to install is not itself installed) then load it up! if unsatisfied || !isinstalled(dl_info...; prefix=prefix) # Download and install binaries - install(dl_info...; prefix=prefix, force=true, verbose=verbose) + @static if Sys.iswindows() + install(dl_info...; prefix=prefix, force=true, verbose=verbose, ignore_platform=true) + else + install(dl_info...; prefix=prefix, force=true, verbose=verbose) + end end