Fix c-to-rust on OSX

This commit is contained in:
Alex Crichton
2015-04-21 16:49:17 -07:00
parent 9d2ba106f9
commit 5680d650ab

View File

@@ -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