Skip to content

Commit

Permalink
Remove cdylib crate-type
Browse files Browse the repository at this point in the history
Clients who want a cdylib (including C clients) should use
`cargo rustc --crate-type cdylib` to override the default crate-type.
  • Loading branch information
jrose-signal committed Feb 14, 2023
1 parent 76a2d04 commit 0fe52ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ tempfile = "3.2"

[lib]
name = "sysinfo"
crate_type = ["rlib", "cdylib"]

[features]
default = ["multithread"]
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0fe52ed

Please sign in to comment.