mirror of
https://github.com/yuzu-mirror/unicorn.git
synced 2026-04-04 14:07:42 +00:00
Add ASAN build target with UNICORN_ASAN or via './make.sh asan'
This commit is contained in:
parent
8932463f9d
commit
93063d089b
4 changed files with 32 additions and 4 deletions
14
Makefile
14
Makefile
|
|
@ -64,6 +64,13 @@ else
|
|||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
ifeq ($(UNICORN_ASAN),yes)
|
||||
CC = clang -fsanitize=address -fno-omit-frame-pointer
|
||||
CXX = clang++ -fsanitize=address -fno-omit-frame-pointer
|
||||
AR = llvm-ar
|
||||
LDFLAGS := -fsanitize=address ${LDFLAGS}
|
||||
endif
|
||||
|
||||
ifeq ($(CROSS),)
|
||||
CC ?= cc
|
||||
AR ?= ar
|
||||
|
|
@ -122,7 +129,7 @@ EXT = so
|
|||
VERSION_EXT = $(EXT).$(API_MAJOR)
|
||||
AR_EXT = a
|
||||
$(LIBNAME)_LDFLAGS += -Wl,-Bsymbolic-functions,-soname,lib$(LIBNAME).$(VERSION_EXT)
|
||||
UNICORN_CFLAGS += -fvisibility=hidden
|
||||
# UNICORN_CFLAGS += -fvisibility=hidden
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
@ -213,11 +220,11 @@ config:
|
|||
qemu/config-host.h-timestamp:
|
||||
ifeq ($(UNICORN_DEBUG),yes)
|
||||
cd qemu && \
|
||||
./configure --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
|
||||
./configure --cc="${CC}" --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
|
||||
printf "$(UNICORN_ARCHS)" > config.log
|
||||
else
|
||||
cd qemu && \
|
||||
./configure --disable-debug-info --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
|
||||
./configure --cc="${CC}" --disable-debug-info --extra-cflags="$(UNICORN_CFLAGS)" --target-list="$(UNICORN_TARGETS)" ${UNICORN_QEMU_FLAGS}
|
||||
printf "$(UNICORN_ARCHS)" > config.log
|
||||
endif
|
||||
|
||||
|
|
@ -264,7 +271,6 @@ endif
|
|||
test: all
|
||||
$(MAKE) -C tests/unit test
|
||||
|
||||
|
||||
install: compile_lib $(PKGCFGF)
|
||||
mkdir -p $(DESTDIR)$(LIBDIR)
|
||||
ifeq ($(UNICORN_SHARED),yes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue