mirror of
https://github.com/EmbarkStudios/rust-gpu.git
synced 2024-11-22 06:45:13 +00:00
right! non-cdylibs dylibs exist. neat!
This commit is contained in:
parent
d6a1e0372f
commit
fd1471066d
@ -5,7 +5,7 @@ authors = ["Ashley Hauck <ashley.hauck@embark-studios.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
crate-type = ["dylib"]
|
||||
|
||||
[dependencies]
|
||||
spirv-std = { path = "../../spirv-std" }
|
||||
|
@ -5,8 +5,7 @@
|
||||
use core::panic::PanicInfo;
|
||||
use spirv_std::Private;
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn screaming_bananans(mut x: Private<u32>) {
|
||||
pub fn screaming_bananans(mut x: Private<u32>) {
|
||||
x.store(x.load() + 1);
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
"exe-suffix": ".spv",
|
||||
"crt-static-allows-dylibs": true,
|
||||
"dynamic-linking": true,
|
||||
"only-cdylib": true,
|
||||
"emit-debug-gdb-scripts": false,
|
||||
"env": "",
|
||||
"executables": true,
|
||||
|
@ -331,7 +331,7 @@ impl WriteBackendMethods for SpirvCodegenBackend {
|
||||
|
||||
impl ExtraBackendMethods for SpirvCodegenBackend {
|
||||
fn new_metadata(&self, _: TyCtxt<'_>, _: &str) -> Self::Module {
|
||||
todo!()
|
||||
Self::Module::new()
|
||||
}
|
||||
|
||||
fn write_compressed_metadata<'tcx>(
|
||||
@ -340,7 +340,7 @@ impl ExtraBackendMethods for SpirvCodegenBackend {
|
||||
_: &EncodedMetadata,
|
||||
_: &mut Self::Module,
|
||||
) {
|
||||
todo!()
|
||||
// Ignore for now.
|
||||
}
|
||||
|
||||
fn codegen_allocator<'tcx>(&self, _: TyCtxt<'tcx>, _: &mut Self::Module, _: AllocatorKind) {
|
||||
|
@ -58,7 +58,7 @@ pub fn link<'a>(
|
||||
CrateType::Rlib => {
|
||||
link_rlib(codegen_results, &out_filename);
|
||||
}
|
||||
CrateType::Executable | CrateType::Cdylib => {
|
||||
CrateType::Executable | CrateType::Cdylib | CrateType::Dylib => {
|
||||
link_exe(sess, crate_type, &out_filename, codegen_results)
|
||||
}
|
||||
other => panic!("CrateType {:?} not supported yet", other),
|
||||
|
Loading…
Reference in New Issue
Block a user