HomePhabricator

Fixes `--enable-asan` compilation in MacOS

Authored by matiu on May 9 2018, 20:00.

Description

Fixes --enable-asan compilation in MacOS

Summary:
This fixes --enable-asan linkage for MacOS.

--fsanitize=address is not passed by default by libtool when linking libbitcoinconsesus, probably because of https://www.gnu.org/software/libtool/manual/html_node/Stripped-link-flags.html

By simply adding the flag in LIBTOOL_APP_LDFLAGS, the option is pass, and the library created successfully.

For Address sanitation, it is necesary to disable assembly (--disable-asm) in MacOS, the llvm compiler doesnt seem to understand the inline asm format with using --enable-asan, not sure why.

Test Plan: ./configure --enable-asan --disable-asm && make && ./src/test/test_bitcoin

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix, schancel, teamcity

Differential Revision: https://reviews.bitcoinabc.org/D1407

Details

Committed
matiuMay 21 2018, 06:28
Pushed
jasonbcoxMay 21 2018, 19:31
Reviewer
Restricted Project
Differential Revision
D1407: Fixes `--enable-asan` compilation in MacOS
Parents
rSTAGING2077a44d5cf6: Better error message from ParseScript
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/3923, tag: phabricator/base/3919