From e3fd7d1f8605fcad5535859f685b8d844350b968 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Tue, 14 Feb 2023 11:26:26 -0800 Subject: [PATCH] Remove cdylib crate-type Clients who want a cdylib (including C clients) should use `cargo rustc --crate-type cdylib` to override the default crate-type. --- Cargo.toml | 1 - Makefile | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 80ec36f15..eac670364 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,6 @@ tempfile = "3.2" [lib] name = "sysinfo" -crate_type = ["rlib", "cdylib"] [features] default = ["multithread"] diff --git a/Makefile b/Makefile index 0dc114ce8..fffd987e6 100644 --- a/Makefile +++ b/Makefile @@ -27,12 +27,12 @@ OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ)) simple: $(OBJ) @echo "Compiling in debug mode" - cargo build --features=c-interface + cargo rustc --features=c-interface --crate-type cdylib gcc -o $@ $^ $(CFLAGS) -L$(LDIR) $(LIBS) release: $(OBJ) @echo "Compiling in release mode" - cargo build --features=c-interface --release + cargo rustc --features=c-interface --release --crate-type cdylib gcc -o simple $^ $(CFLAGS) -L$(LDIR-RELEASE) $(LIBS) $(ODIR)/%.o: %.c $(DEPS)