Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / service_runtime / linux / nacl_bootstrap.gyp
index 1d472d7..4ca2478 100644 (file)
                   ['exclude', '^--sysroot=.*']],
       'ldflags/': [['exclude', '^-m.*'],
                    ['exclude', '^--sysroot=.*']],
+      'cflags!': [
+        # MemorySanitizer reports an error in this binary unless instrumented
+        # libelf is supplied. Because libelf source code uses gcc extensions,
+        # building it with MemorySanitizer (which implies clang) is challenging,
+        # and it's much simpler to just disable MSan for this target.
+        '-fsanitize=memory',
+        '-fsanitize-memory-track-origins',
+        # This causes an "unused argument" warning in C targets.
+        '-stdlib=libc++',
+      ],
+      'ldflags!': [
+        '-fsanitize=memory',
+      ],
     },
     {
       'target_name': 'nacl_bootstrap_lib',
       ],
       'cflags!': [
         '-fsanitize=address',
+        '-fsanitize=memory',
         '-w',
         # We filter these out because release_extra_cflags or another
         # such thing might be adding them in, and those options wind up
         '-fprofile-generate',
         '-finstrument-functions',
         '-funwind-tables',
+        # This causes an "unused argument" warning in C targets.
+        '-stdlib=libc++',
       ],
       'conditions': [
         ['clang==1', {