Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: tools/asan_build

Issue 18205007: Enable ASAN build (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common_variables.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/asan_build
===================================================================
--- tools/asan_build (revision 0)
+++ tools/asan_build (revision 0)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+# Build Skia with Address Sanitizer.
+#
+# Address Sanitizer is available in LLVM (and Clang) 3.1 and above, as well as
+# GCC 4.8. For now, this script assumes the use of Clang 3.2 or newer, which
+# uses different flag syntax from 3.1.
+#
+# For more information, see:
+# https://code.google.com/p/address-sanitizer/wiki/AddressSanitizer
+
+makeVars="$@"
+
+export CC="$(which clang)"
+export CXX="$(which clang++)"
+export LINK="$(which clang)"
+
+noClang="Couldn't find Clang on this machine!"
+if [[ -z "${CC}" ]]; then
+ echo "${noClang}"
+ exit 1
+fi
+if [[ -z "${CXX}" ]]; then
+ echo "${noClang}"
+ exit 1
+fi
+if [[ -z "${LINK}" ]]; then
+ echo "${noClang}"
+ exit 1
+fi
+
+export GYP_DEFINES="skia_asan_build=1 ${GYP_DEFINES}"
+
+python gyp_skia
+if [[ "$?" != "0" ]]; then
+ exit 1
+fi
+
+make ${makeVars}
+if [[ "$?" != "0" ]]; then
+ exit 1
+fi
Property changes on: tools/asan_build
___________________________________________________________________
Added: svn:executable
+ *
« no previous file with comments | « gyp/common_variables.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698