Skip to content

Commit 042dc9f

Browse files
committed
REVERT: Debug Windows CI build
bender-slang(build): Don't use system-installed slang dependencies REVERT: Debug Windows CI build bender-slang(build): Don't use system-installed slang dependencies REVERT: Debug Windows CI build
1 parent eb8f502 commit 042dc9f

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

crates/bender-slang/build.rs

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ fn main() {
1414
.define("BUILD_SHARED_LIBS", "OFF")
1515
// Forces installation into 'lib' instead of 'lib64' on some systems.
1616
.define("CMAKE_INSTALL_LIBDIR", "lib")
17-
// TODO(fischeti): `fmt` currently causes issues on my machine since there is a system-wide installation.
17+
// Disable finding system-installed packages, we want to fetch and build them from source.
1818
.define("CMAKE_DISABLE_FIND_PACKAGE_fmt", "ON")
19-
// TODO(fischeti): Investigate how boost should be handled properly.
20-
.cxxflag("-DSLANG_BOOST_SINGLE_HEADER=1");
19+
.define("CMAKE_DISABLE_FIND_PACKAGE_mimalloc", "ON")
20+
.define("CMAKE_DISABLE_FIND_PACKAGE_Boost", "ON");
2121

2222
// Windows / MSVC specific flags
2323
if target_env == "msvc" {
@@ -27,6 +27,24 @@ fn main() {
2727
// Build the slang library
2828
let dst = slang_lib.build();
2929

30+
// --- DEBUGGING: Dump library directory contents ---
31+
let lib_dir = dst.join("lib");
32+
println!(
33+
"cargo:warning=Searching for libraries in: {}",
34+
lib_dir.display()
35+
);
36+
match std::fs::read_dir(&lib_dir) {
37+
Ok(entries) => {
38+
for entry in entries {
39+
if let Ok(entry) = entry {
40+
println!("cargo:warning= Found file: {:?}", entry.file_name());
41+
}
42+
}
43+
}
44+
Err(e) => println!("cargo:warning= Error reading directory: {}", e),
45+
}
46+
// --------------------------------------------------
47+
3048
// Configure Linker to find Slang static library
3149
println!("cargo:rustc-link-search=native={}/lib", dst.display());
3250
println!("cargo:rustc-link-lib=static=svlang");
@@ -49,14 +67,10 @@ fn main() {
4967
bridge_build
5068
.file("cpp/slang_bridge.cpp")
5169
.flag_if_supported("-std=c++20")
52-
// Static Linking Definition
5370
// Tells Slang headers not to look for DLL import/export symbols.
5471
.define("SLANG_STATIC_DEFINE", "1")
55-
// Boost Vendored Mode
56-
// Tells Slang to use the local 'external/boost_*.hpp' files instead of system Boost.
57-
// TODO(fischeti): Investigate how boost should be handled properly.
72+
// Tells Slang to use vendor-provided instead of system-installed Boost header files.
5873
.define("SLANG_BOOST_SINGLE_HEADER", "1")
59-
// Include Paths
6074
.include("vendor/slang/include")
6175
.include("vendor/slang/external")
6276
.include(dst.join("include"));

0 commit comments

Comments
 (0)