diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-07-08 12:40:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 12:40:54 +0200 |
commit | 2172e60f7a53a56ff1ce04f3b683fb618fc5d3f7 (patch) | |
tree | a00b7d7ec683601412aa2915e78af29e7c564f97 /nix-rust | |
parent | 156666de3da4a754582259bcc2fe68018ed2d3a5 (diff) | |
parent | 4f80464645e4c8e7ca9455fc53cc76dc50f688ed (diff) |
Merge pull request #4935 from alyssais/host_os
Apply OS checks to host platform, not build
Diffstat (limited to 'nix-rust')
-rw-r--r-- | nix-rust/local.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nix-rust/local.mk b/nix-rust/local.mk index 9650cdf93..538244594 100644 --- a/nix-rust/local.mk +++ b/nix-rust/local.mk @@ -11,12 +11,12 @@ libnixrust_INSTALL_PATH := $(libdir)/libnixrust.$(SO_EXT) libnixrust_LDFLAGS_USE := -L$(d)/target/$(RUST_DIR) -lnixrust libnixrust_LDFLAGS_USE_INSTALLED := -L$(libdir) -lnixrust -ifeq ($(OS), Linux) +ifdef HOST_LINUX libnixrust_LDFLAGS_USE += -ldl libnixrust_LDFLAGS_USE_INSTALLED += -ldl endif -ifeq ($(OS), Darwin) +ifdef HOST_DARWIN libnixrust_BUILD_FLAGS = NIX_LDFLAGS="-undefined dynamic_lookup" else libnixrust_LDFLAGS_USE += -Wl,-rpath,$(abspath $(d)/target/$(RUST_DIR)) @@ -31,7 +31,7 @@ $(libnixrust_PATH): $(call rwildcard, $(d)/src, *.rs) $(d)/Cargo.toml $(libnixrust_INSTALL_PATH): $(libnixrust_PATH) $(target-gen) cp $^ $@ -ifeq ($(OS), Darwin) +ifdef HOST_DARWIN install_name_tool -id $@ $@ endif @@ -40,7 +40,7 @@ clean: clean-rust clean-rust: $(suppress) rm -rfv nix-rust/target -ifneq ($(OS), Darwin) +ifndef HOST_DARWIN check: rust-tests rust-tests: |