Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions builder/src/arch/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ use std::fs;
use std::path::PathBuf;

pub const NATIVE_LIBS: &str = "";
pub const PROF_DYNAMIC_LIB: &str = "datadog_profiling.dll";
pub const PROF_STATIC_LIB: &str = "datadog_profiling.lib";
pub const PROF_PDB: &str = "datadog_profiling.pdb";
pub const PROF_DYNAMIC_LIB: &str = "datadog_profiling_ffi.dll";
pub const PROF_STATIC_LIB: &str = "datadog_profiling_ffi.lib";
pub const PROF_PDB: &str = "datadog_profiling_ffi.pdb";
pub const PROF_DYNAMIC_LIB_FFI: &str = "datadog_profiling_ffi.dll";
pub const PROF_STATIC_LIB_FFI: &str = "datadog_profiling_ffi.lib";
pub const PROF_PDB_FFI: &str = "datadog_profiling_ffi.pdb";
pub const PROF_DLL_IMPORT_LIB_FFI: &str = "datadog_profiling_ffi.dll.lib";
pub const BUILD_CRASHTRACKER: bool = false;
pub const RUSTFLAGS: [&str; 4] = [
"-C",
Expand All @@ -25,6 +26,9 @@ pub fn strip_libraries(_lib_path: &str) {}
pub fn add_additional_files(lib_path: &str, target_path: &OsStr) {
let from_pdb: PathBuf = [lib_path, PROF_PDB_FFI].iter().collect();
let to_pdb: PathBuf = [target_path, OsStr::new(PROF_PDB)].iter().collect();

fs::copy(from_pdb, to_pdb).expect("unable to copy pdb file");

let from_imp: PathBuf = [lib_path, PROF_DLL_IMPORT_LIB_FFI].iter().collect();
let to_imp: PathBuf = [target_path, OsStr::new(PROF_DLL_IMPORT_LIB_FFI)].iter().collect();
fs::copy(from_imp, to_imp).expect("unable to copy dll import lib");
}
13 changes: 8 additions & 5 deletions builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,14 @@ impl Builder {
fs::create_dir_all(Path::new(self.target_include.as_ref()))
.expect("Failed to create include directory");
fs::create_dir_all(Path::new(self.target_lib.as_ref()))
.expect("Failed to create include directory");
fs::create_dir_all(Path::new(self.target_bin.as_ref()))
.expect("Failed to create include directory");
fs::create_dir_all(Path::new(self.target_pkconfig.as_ref()))
.expect("Failed to create include directory");
.expect("Failed to create lib directory");
#[cfg(not(target_os = "windows"))]
{
fs::create_dir_all(Path::new(self.target_bin.as_ref()))
.expect("Failed to create bin directory");
fs::create_dir_all(Path::new(self.target_pkconfig.as_ref()))
.expect("Failed to create pkgconfig directory");
}
}

pub fn add_cmake(&self) {
Expand Down
3 changes: 3 additions & 0 deletions builder/src/profiling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ impl Profiling {
}

fn add_pkg_config(&self) -> Result<()> {
#[cfg(target_os = "windows")]
return Ok(());

let files: [&str; 3] = [
"datadog_profiling.pc",
"datadog_profiling_with_rpath.pc",
Expand Down
89 changes: 0 additions & 89 deletions windows/build-artifacts.ps1

This file was deleted.

Loading