diff --git a/Makefile b/Makefile index e0f7b944..96d73625 100644 --- a/Makefile +++ b/Makefile @@ -95,12 +95,13 @@ CXXFLAGS ?= $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS) CXXFLAGS += '-I$(MAKEFILE_DIR)/include' CXXFLAGS += '-DFLOX_PKGDB_VERSION="$(VERSION)"' LDFLAGS ?= $(EXTRA_LDFLAGS) -lib_CXXFLAGS ?= -shared -fPIC ifeq (Linux,$(OS)) -lib_LDFLAGS ?= -shared -fPIC -Wl,--no-undefined +SHARED = -shared else -lib_LDFLAGS ?= -shared -fPIC -Wl,-undefined,error +SHARED = endif +lib_CXXFLAGS ?= $(SHARED) -fPIC +lib_LDFLAGS ?= $(SHARED) -fPIC -Wl,-undefined,error bin_CXXFLAGS ?= bin_LDFLAGS ?= diff --git a/flake.nix b/flake.nix index 641a510b..36ebe416 100644 --- a/flake.nix +++ b/flake.nix @@ -92,6 +92,11 @@ ] ++ nixpkgs.lib.optionals pkgsFor.stdenv.isLinux [ # For debugging pkgsFor.valgrind + ] ++ nixpkgs.lib.optionals ( + ( pkgsFor.stdenv.hostPlatform.useLLVM or false ) || + ( pkgsFor.stdenv.hostPlatform.isDarwin or false ) + ) [ + pkgsFor.clang_16 ]; inherit (pkgsFor.flox-pkgdb) nix_INCDIR boost_CFLAGS libExt SEMVER_PATH