From d18102ba0c72cfe2e91d69550e97d9f5925464d6 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 28 Oct 2024 19:21:17 -0700 Subject: [PATCH 1/3] Mention that rust should be installed on macOS as well. --- INSTALL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/INSTALL.md b/INSTALL.md index 148ea0f358..619c9a8635 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -153,6 +153,7 @@ rm -rf llvm-project/ ### MacOS When building on MacOS, here's some dependencies you'll need: - Install xcode +- Install [Rust](#installing-rust) - Install [homebrew](https://brew.sh) - `brew install libsodium libtool autoconf automake pkg-config libpq openssl parallel ccache bison gnu-sed perl coreutils` From 17b4a1c42cd7fb8409f6780837b78cf639ae397f Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 28 Oct 2024 19:22:40 -0700 Subject: [PATCH 2/3] Prohibit combining --enable-asan and --enable-tracy (which leaks) Since we've switched tracy away from manual-lifetime mode, it now leaks its main object on exit. This causes an asan error. But there is really no good reason to run asan and tracy at the same time anyways. They do different things and interfere with one another. --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 1e21172d7c..78edfc8f16 100644 --- a/configure.ac +++ b/configure.ac @@ -363,6 +363,10 @@ AC_ARG_ENABLE(tracy-memory-tracking, AS_HELP_STRING([--enable-tracy-memory-tracking], [Enable 'tracy' profiler/tracer memory tracking code (slow)])) AM_CONDITIONAL(USE_TRACY_MEMORY_TRACKING, [test x$enable_tracy_memory_tracking = xyes]) + +if test x"$enable_tracy" = xyes -a x"$enable_asan" = xyes; then + AC_MSG_ERROR([--enable-asan is not compatible with --enable-tracy]) +fi if test x"$enable_tracy_memory_tracking" = xyes -a x"$enable_asan" = xyes; then AC_MSG_ERROR([--enable-asan is not compatible with --enable-tracy-memory-tracking]) fi From 9746cd3dd3e8893ba8c2440c87df81e4c4bb57fa Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 28 Oct 2024 19:24:56 -0700 Subject: [PATCH 3/3] Remove -lasan hack from Makefile.am: seems unnecessary, breaks macOS --- src/Makefile.am | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 8e0fb72834..a505f44d7e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,13 +17,6 @@ noinst_HEADERS = $(SRC_H_FILES) # realize that it needs this setting. CXXSTDLIB := $(if $(findstring -stdlib=libc++,$(CXXFLAGS)),c++,$(if $(findstring -stdlib=libstdc++,$(CXXFLAGS)),stdc++,)) -# If we are building with -fsanitize=address, any build.rs-built C++ code will -# depend on asan, so we need to tell rustc to link with in the asan runtime as -# well. Interestingly, passing -Clink-arg=-fsanitize=address to rustc does not -# work, despite being the recommended approach, it seems rustc passes some other -# flags to the linker that conflict with -fsanitize=address. -RUSTFLAGS_ASAN := $(if $(findstring -fsanitize=address,$(CXXFLAGS)),-Clink-arg=-lasan,) - if USE_TRACY # NB: this unfortunately long list has to be provided here and kept in sync with # the list of features for tracy-client in src/rust/Cargo.toml. This is because