Skip to content

Commit

Permalink
fix compatibility with linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Aug 27, 2024
1 parent 3de6e82 commit e62eaea
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions luisa_compute/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,6 @@ strict = ["luisa_compute_sys/strict"]
remote = ["luisa_compute_sys/remote"]
cpu = ["luisa_compute_sys/cpu"]
oidn = ["luisa_compute_sys/oidn"]
wayland = ["luisa_compute_sys/wayland"]
glam = ["dep:glam"]
nalgebra = ["dep:nalgebra"]
1 change: 1 addition & 0 deletions luisa_compute_sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ remote = []
metal = []
dx = []
oidn = []
wayland = []

4 changes: 3 additions & 1 deletion luisa_compute_sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ fn cmake_build() -> PathBuf {
set_from_env!("PYTHON", "LUISA_COMPUTE_ENABLE_PYTHON");
set_from_env!("GUI", "LUISA_COMPUTE_ENABLE_GUI");
set_from_env!("OIDN", "LUISA_COMPUTE_DOWNLOAD_OIDN");
set_from_env!("WAYLAND", "LUISA_COMPUTE_ENABLE_WAYLAND");
config.define(
"LUISA_COMPUTE_CHECK_BACKEND_DEPENDENCIES",
if cfg!(feature = "strict") {
Expand Down Expand Up @@ -199,10 +200,11 @@ fn main() {
{
println!("rerun-if-changed=./llvm_dummy_orc");
let out = cmake::Config::new("./llvm_dummy_orc")
.generator("Ninja")
.build_target("dummy_orc_eh")
.build();
dbg!(&out);
println!("cargo:rustc-link-lib=dylib=dummy_orc_eh");
println!("cargo:rustc-link-lib=static=dummy_orc_eh");
println!("cargo:rustc-link-search=native={}/build", out.display());
}
}
3 changes: 2 additions & 1 deletion luisa_compute_sys/llvm_dummy_orc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.15)
project(dummy_orc_eh)

add_library(dummy_orc_eh SHARED dummy_orc_eh.cc)
add_library(dummy_orc_eh STATIC dummy_orc_eh.cc)
set_property(TARGET dummy_orc_eh PROPERTY POSITION_INDEPENDENT_CODE ON)

0 comments on commit e62eaea

Please sign in to comment.