From cb62c8b3cc981cbffa3b151d15961573c71fac51 Mon Sep 17 00:00:00 2001 Message-Id: From: Christoph Erhardt Date: Sat, 6 Aug 2022 09:18:54 +0200 Subject: [PATCH] Use system-compatible include path for `xxhash.h` Distributors that build mold against the system-provided xxHash package expect its header file `xxhash.h` in the top-level include directory, not in an `xxhash` subdirectory. Adjust the include path and the `#include` directive accordingly. --- Makefile | 1 + mold.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3f47801..59943a9c 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,7 @@ CXXFLAGS = -O2 MOLD_CXXFLAGS := -std=c++20 -fno-exceptions -fno-unwind-tables \ -fno-asynchronous-unwind-tables \ + -Ithird-party -Ithird-party/xxhash \ -DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\"" ifeq ($(OS), OpenBSD) diff --git a/mold.h b/mold.h index 94ef8226..9f857534 100644 --- a/mold.h +++ b/mold.h @@ -32,7 +32,7 @@ #endif #define XXH_INLINE_ALL 1 -#include "third-party/xxhash/xxhash.h" +#include #ifdef NDEBUG # define unreachable() __builtin_unreachable() -- 2.37.2