Skip to content

Commit 293cc45

Browse files
committed
ci: use builder on windows platforms
1 parent fff4fd3 commit 293cc45

4 files changed

Lines changed: 19 additions & 98 deletions

File tree

builder/src/arch/windows.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ use std::fs;
66
use std::path::PathBuf;
77

88
pub const NATIVE_LIBS: &str = "";
9-
pub const PROF_DYNAMIC_LIB: &str = "datadog_profiling.dll";
10-
pub const PROF_STATIC_LIB: &str = "datadog_profiling.lib";
11-
pub const PROF_PDB: &str = "datadog_profiling.pdb";
9+
pub const PROF_DYNAMIC_LIB: &str = "datadog_profiling_ffi.dll";
10+
pub const PROF_STATIC_LIB: &str = "datadog_profiling_ffi.lib";
11+
pub const PROF_PDB: &str = "datadog_profiling_ffi.pdb";
1212
pub const PROF_DYNAMIC_LIB_FFI: &str = "datadog_profiling_ffi.dll";
1313
pub const PROF_STATIC_LIB_FFI: &str = "datadog_profiling_ffi.lib";
1414
pub const PROF_PDB_FFI: &str = "datadog_profiling_ffi.pdb";
15+
pub const PROF_DLL_IMPORT_LIB_FFI: &str = "datadog_profiling_ffi.dll.lib";
1516
pub const BUILD_CRASHTRACKER: bool = false;
1617
pub const RUSTFLAGS: [&str; 4] = [
1718
"-C",
@@ -25,6 +26,9 @@ pub fn strip_libraries(_lib_path: &str) {}
2526
pub fn add_additional_files(lib_path: &str, target_path: &OsStr) {
2627
let from_pdb: PathBuf = [lib_path, PROF_PDB_FFI].iter().collect();
2728
let to_pdb: PathBuf = [target_path, OsStr::new(PROF_PDB)].iter().collect();
28-
2929
fs::copy(from_pdb, to_pdb).expect("unable to copy pdb file");
30+
31+
let from_imp: PathBuf = [lib_path, PROF_DLL_IMPORT_LIB_FFI].iter().collect();
32+
let to_imp: PathBuf = [target_path, OsStr::new(PROF_DLL_IMPORT_LIB_FFI)].iter().collect();
33+
fs::copy(from_imp, to_imp).expect("unable to copy dll import lib");
3034
}

builder/src/builder.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,14 @@ impl Builder {
116116
fs::create_dir_all(Path::new(self.target_include.as_ref()))
117117
.expect("Failed to create include directory");
118118
fs::create_dir_all(Path::new(self.target_lib.as_ref()))
119-
.expect("Failed to create include directory");
120-
fs::create_dir_all(Path::new(self.target_bin.as_ref()))
121-
.expect("Failed to create include directory");
122-
fs::create_dir_all(Path::new(self.target_pkconfig.as_ref()))
123-
.expect("Failed to create include directory");
119+
.expect("Failed to create lib directory");
120+
#[cfg(not(target_os = "windows"))]
121+
{
122+
fs::create_dir_all(Path::new(self.target_bin.as_ref()))
123+
.expect("Failed to create bin directory");
124+
fs::create_dir_all(Path::new(self.target_pkconfig.as_ref()))
125+
.expect("Failed to create pkgconfig directory");
126+
}
124127
}
125128

126129
pub fn add_cmake(&self) {

builder/src/profiling.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ impl Profiling {
118118
}
119119

120120
fn add_pkg_config(&self) -> Result<()> {
121+
#[cfg(target_os = "windows")]
122+
return Ok(());
123+
121124
let files: [&str; 3] = [
122125
"datadog_profiling.pc",
123126
"datadog_profiling_with_rpath.pc",

windows/build-artifacts.ps1

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)