Skip to content

Commit

Permalink
Fix BLAS on Windows (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored Mar 15, 2022
1 parent 0742289 commit e0ae6f9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,23 @@ module FFI
function get_blas_symbols()
symbols = Set{String}()
path = Libdl.dlpath(BLAS.libblas)
ignoreSymbols = Set(String["", "edata", "_edata", "end", "_end", "_bss_start", "__bss_start"])
ignoreSymbols = Set(String["", "edata", "_edata", "end", "_end", "_bss_start", "__bss_start", ".text", ".data"])
for s in Symbols(readmeta(open(path, "r")))
name = symbol_name(s)
BLAS.vendor() == :openblas64 && endswith(name, "64_") || continue
if !Sys.iswindows() && BLAS.vendor() == :openblas64
endswith(name, "64_") || continue
else
endswith(name, "_") || continue
end
if !in(name, ignoreSymbols)
push!(symbols, name)
end
end
return collect(symbols)
symbols = collect(symbols)
if Sys.iswindows() && BLAS.vendor() == :openblas64
return map(n->n*"64_", symbols)
end
return symbols
end

function lookup_blas_symbol(name)
Expand Down

5 comments on commit e0ae6f9

@vchuravy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vchuravy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/56666

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" e0ae6f92af85434970e9345498053f567831a675
git push origin v0.9.0

@vchuravy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/56666

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.9.0 -m "<description of version>" e0ae6f92af85434970e9345498053f567831a675
git push origin v0.9.0

Please sign in to comment.