Fix c-to-rust on OSX
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
ifeq ($(shell uname),Darwin)
|
||||
LDFLAGS := -Wl,-dead_strip
|
||||
else
|
||||
LDFLAGS := -Wl,--gc-sections -lpthread
|
||||
endif
|
||||
|
||||
all: target/double
|
||||
target/double
|
||||
|
||||
@@ -5,7 +11,7 @@ target:
|
||||
mkdir -p $@
|
||||
|
||||
target/double: target/main.o target/libdouble_input.a
|
||||
$(CC) -o $@ -Wl,--gc-sections $^ -lpthread
|
||||
$(CC) -o $@ $(LDFLAGS) $^
|
||||
|
||||
target/libdouble_input.a: src/lib.rs Cargo.toml
|
||||
cargo build
|
||||
|
||||
Reference in New Issue
Block a user