From: yangguo@chromium.org Date: Tue, 1 Jul 2014 09:04:48 +0000 (+0000) Subject: Add msan build option. X-Git-Tag: upstream/4.7.83~8460 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e711d193c3fe13adace83179c8373d418a9bcc9f;p=platform%2Fupstream%2Fv8.git Add msan build option. Currently works only in combination with i18nsupport=off. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/367623002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22109 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/Makefile b/Makefile index 3ac994a..bcb3922 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,13 @@ ifneq ($(strip $(asan)),) export LINK=$(asan) export ASAN_SYMBOLIZER_PATH="$(dir $(asan))llvm-symbolizer" endif - +# msan=/path/to/clang++ +ifneq ($(strip $(msan)),) + GYPFLAGS += -Dmsan=1 -Dmsan_track_origins=2 + export CXX=$(msan) + export CXX_host=$(msan) + export LINK=$(msan) +endif # arm specific flags. # arm_version= ifneq ($(strip $(arm_version)),) diff --git a/build/standalone.gypi b/build/standalone.gypi index cf448f3..92b5ff8 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -35,6 +35,7 @@ 'component%': 'static_library', 'clang%': 0, 'asan%': 0, + 'msan%': 0, 'visibility%': 'hidden', 'v8_enable_backtrace%': 0, 'v8_enable_i18n_support%': 1, @@ -185,6 +186,22 @@ ], }, }], + ['msan==1', { + 'target_defaults': { + 'cflags_cc+': [ + '-fno-omit-frame-pointer', + '-fsanitize-memory-track-origins=2', + '-fsanitize=memory', + '-w', # http://crbug.com/162783 + ], + 'cflags_cc!': [ + '-fomit-frame-pointer', + ], + 'ldflags': [ + '-fsanitize=memory', + ], + }, + }], ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \ or OS=="netbsd"', { 'target_defaults': {