Reviewers: Jakob,

Description:
Add msan build option.

Currently works only in combination with i18nsupport=off.

[email protected]

Please review this at https://codereview.chromium.org/367623002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+23, -1 lines):
  M Makefile
  M build/standalone.gypi


Index: Makefile
diff --git a/Makefile b/Makefile
index 3ac994a9df2d8fd1288a153ed421d5cf80340c81..bcb392246fff79630c1a8049b25c65ea270a45eb 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=<number | "default">
 ifneq ($(strip $(arm_version)),)
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index cf448f38673559de322e675b5500f8de6e1905e0..a5778e8e95f5ad4fd565830c384d6b9eac2560dc 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -185,6 +185,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': {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to