Skip to content

Commit 9ed2413

Browse files
committed
libuv: forward sanitizer flags, if we build it
There is also a cmake option for -DASAN=ON, but this is equivalent and more flexible for our use case.
1 parent d78ecc7 commit 9ed2413

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

deps/libuv.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ ifeq ($(USEICC), 1)
1212
UV_CFLAGS += -static-intel
1313
endif
1414

15-
UV_FLAGS := LDFLAGS="$(LDFLAGS) $(CLDFLAGS) -v"
16-
ifneq ($(UV_CFLAGS),)
17-
UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS)"
18-
endif
15+
UV_FLAGS += CFLAGS="$(CFLAGS) $(UV_CFLAGS) $(SANITIZE_OPTS)"
1916
ifeq ($(USEMSVC), 1)
2017
UV_FLAGS += --disable-shared
2118
endif
@@ -26,6 +23,9 @@ endif
2623

2724
LIBUV_BUILDDIR := $(BUILDDIR)/$(LIBUV_SRC_DIR)
2825

26+
ifneq ($(CLDFLAGS)$(SANITIZE_LDFLAGS),)
27+
$(LIBUV_BUILDDIR)/build-configured: LDFLAGS:=$(LDFLAGS) $(CLDFLAGS) $(SANITIZE_LDFLAGS)
28+
endif
2929
$(LIBUV_BUILDDIR)/build-configured: $(SRCCACHE)/$(LIBUV_SRC_DIR)/source-extracted
3030
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/aclocal.m4 # touch a few files to prevent autogen from getting called
3131
touch -c $(SRCCACHE)/$(LIBUV_SRC_DIR)/Makefile.in

0 commit comments

Comments
 (0)