Skip to content

Commit

Permalink
[difftest] build online_vcs as cdylib
Browse files Browse the repository at this point in the history
  • Loading branch information
FanShupei committed Jul 23, 2024
1 parent e09e675 commit 321cc11
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 50 deletions.
10 changes: 5 additions & 5 deletions difftest/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ let
DESIGN_DLEN = elaborateConfig.parameter.dLen;
};

online-dpi-static-lib = rustPlatform.buildRustPackage {
name = "online-dpi-static-lib";
online-dpi-lib = rustPlatform.buildRustPackage {
name = "online-dpi-lib";

inherit src env;

cargoLock = {
lockFile = ./Cargo.lock;
};

buildFeatures = [ "svvpi" ];
buildAndTestSubdir = "./online_dpi";
buildFeatures = lib.optionals verilated.enable-trace [ "trace" ];
buildAndTestSubdir = "./online_vcs";
};

self = rustPlatform.buildRustPackage {
Expand Down Expand Up @@ -84,7 +84,7 @@ let
clang-tools
];
});
inherit spike_interfaces online-dpi-static-lib;
inherit spike_interfaces online-dpi-lib;
};
};
in
Expand Down
1 change: 0 additions & 1 deletion difftest/online_dpi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name = "online_dpi"
edition = "2021"
version.workspace = true
crate-type = ["staticlib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
3 changes: 3 additions & 0 deletions difftest/online_vcs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "online_vcs"
edition = "2021"
version.workspace = true

[lib]
crate-type = ["cdylib"]

[dependencies]
online_dpi = { path = "../online_dpi", features = ["svvpi"] }

Expand Down
14 changes: 0 additions & 14 deletions difftest/online_vcs/build.rs

This file was deleted.

2 changes: 2 additions & 0 deletions difftest/online_vcs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// force link with online_dpi
extern crate online_dpi;
30 changes: 0 additions & 30 deletions difftest/online_vcs/src/main.rs

This file was deleted.

0 comments on commit 321cc11

Please sign in to comment.