mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-19 16:04:44 +00:00
Prevent linker from stripping exports on Linux (#33)
This commit is contained in:
parent
5cd9a5fbc4
commit
09f679693b
2 changed files with 10 additions and 2 deletions
|
@ -11,6 +11,6 @@ extern crate paste;
|
|||
extern crate ptx;
|
||||
|
||||
#[allow(warnings)]
|
||||
mod cuda;
|
||||
pub mod cuda;
|
||||
mod cuda_impl;
|
||||
pub(crate) mod r#impl;
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
pub extern crate zluda;
|
||||
|
||||
pub use zluda::*;
|
||||
pub use zluda::cuda::*;
|
||||
|
||||
// For some reason, on Linux linker strips out all our re-exports,
|
||||
// there's probably a cleaner solution, but for now just exporting
|
||||
// the function below stops it from doing so
|
||||
#[no_mangle]
|
||||
fn _zluda_very_bad_linker_hack() {
|
||||
cuInit(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue