Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building...
authordfarler@apple.com <dfarler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Aug 2013 17:43:57 +0000 (17:43 +0000)
committerdfarler@apple.com <dfarler@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 6 Aug 2013 17:43:57 +0000 (17:43 +0000)
https://bugs.webkit.org/show_bug.cgi?id=117762

Reviewed by Mark Rowe.

Source/JavaScriptCore:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/JavaScriptCore.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/ToolExecutable.xcconfig:
Don't use ASAN for build tools.

Source/ThirdParty:

* gtest/xcode/Config/General.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* gtest/xcode/Config/StaticLibraryTarget.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.

Source/ThirdParty/ANGLE:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.

Source/WebCore:

No new tests necessary.

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/WebCore.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestShim.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebCoreTestSupport.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* WebCore.xcodeproj/project.pbxproj:
Don't use ASAN for build tools.

Source/WebInspectorUI:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.

Source/WebKit/mac:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/WebKit.xcconfig:
Add ASAN_OTHER_LDFLAGS.

Source/WebKit2:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Configurations/WebContentProcess.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* Configurations/WebKit2.xcconfig:
Add ASAN_OTHER_LDFLAGS.

Source/WTF:

* Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.

Tools:

* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* MiniBrowser/Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* Scripts/check-for-weak-vtables-and-externals:
Ignore ___asan externals, these are populated by compiler-rt.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* WebKitLauncher/Configurations/Base.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* WebKitLauncher/Configurations/WebKitNightlyEnabler.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
* WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
Add ASAN_OTHER_LDFLAGS.
* asan/asan.xcconfig: Added.
* asan/webkit-asan-ignore.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153756 268f45cc-cd09-0410-ab3c-d52691b4dbfc

39 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/DebugRelease.xcconfig
Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
Source/JavaScriptCore/Configurations/ToolExecutable.xcconfig
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/xcode/Config/General.xcconfig
Source/ThirdParty/gtest/xcode/Config/StaticLibraryTarget.xcconfig
Source/WTF/ChangeLog
Source/WTF/Configurations/DebugRelease.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/DebugRelease.xcconfig
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/Configurations/WebCoreTestShim.xcconfig
Source/WebCore/Configurations/WebCoreTestSupport.xcconfig
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/Configurations/DebugRelease.xcconfig
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/DebugRelease.xcconfig
Source/WebKit/mac/Configurations/WebKit.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/DebugRelease.xcconfig
Source/WebKit2/Configurations/WebContentProcess.xcconfig
Source/WebKit2/Configurations/WebKit2.xcconfig
Tools/ChangeLog
Tools/DumpRenderTree/mac/Configurations/DebugRelease.xcconfig
Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
Tools/MiniBrowser/Configurations/DebugRelease.xcconfig
Tools/Scripts/check-for-weak-vtables-and-externals
Tools/TestWebKitAPI/Configurations/DebugRelease.xcconfig
Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
Tools/WebKitLauncher/Configurations/Base.xcconfig
Tools/WebKitLauncher/Configurations/WebKitNightlyEnabler.xcconfig
Tools/WebKitTestRunner/Configurations/DebugRelease.xcconfig
Tools/WebKitTestRunner/Configurations/InjectedBundle.xcconfig
Tools/asan/asan.xcconfig [new file with mode: 0644]
Tools/asan/webkit-asan-ignore.txt [new file with mode: 0644]

index a13d08c..f2895b8 100644 (file)
@@ -1,3 +1,17 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * Configurations/JavaScriptCore.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * Configurations/ToolExecutable.xcconfig:
+        Don't use ASAN for build tools.
+
 2013-08-06  Patrick Gansterer  <paroga@webkit.org>
 
         Build fix for ARM MSVC after r153222 and r153648.
index bf2c8d1..e6e86da 100644 (file)
@@ -42,3 +42,7 @@ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
 DEBUG_INFORMATION_FORMAT = dwarf;
 
 SECTORDER_FLAGS = ; 
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index c779de4..0c8fd9f 100644 (file)
@@ -42,7 +42,7 @@ OTHER_LDFLAGS_LLVM_ENABLE_FTL_JIT = -lpthread -lm -lLLVMTableGen -lLLVMDebugInfo
 
 
 OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
 OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_LLVM) -sub_library libobjc -framework CoreServices;
index a91c757..73c7f0c 100644 (file)
@@ -37,3 +37,7 @@ CLANG_ENABLE_OBJC_ARC = $(CLANG_ENABLE_OBJC_ARC_$(CURRENT_ARCH));
 CLANG_ENABLE_OBJC_ARC_x86_64 = YES;
 CLANG_ENABLE_OBJC_ARC_armv7 = YES;
 CLANG_ENABLE_OBJC_ARC_armv7s = YES;
+
+OTHER_CFLAGS = ;
+OTHER_CPLUSPLUSFLAGS = ;
+OTHER_LDFLAGS = ;
index 05ecd7d..30c9b3d 100644 (file)
@@ -1,3 +1,13 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.
+
 2013-08-06  Zan Dobersek  <zdobersek@igalia.com>
 
         webkit-gtk fails to build with bison-3.0
index f1a0b24..ec771ee 100644 (file)
@@ -11,3 +11,5 @@ MACOSX_DEPLOYMENT_TARGET_1090 = 10.9;
 
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
 DEBUG_INFORMATION_FORMAT = dwarf;
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
index d5b1615..162f078 100644 (file)
@@ -1,3 +1,15 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * gtest/xcode/Config/General.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * gtest/xcode/Config/StaticLibraryTarget.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.
+
 2013-07-27  Mark Rowe  <mrowe@apple.com>
 
         Fix builds against an SDK.
index 2074fd5..9a7ed13 100644 (file)
@@ -52,3 +52,6 @@ SDKROOT_TARGETING_SAME_OS_X_VERSION_ = macosx;
 
 // VERSIONING BUILD SETTINGS (used in Info.plist)
 GTEST_VERSIONINFO_ABOUT =  © 2008 Google Inc.
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index 3922fa5..dd33255 100644 (file)
@@ -16,3 +16,5 @@ STRIP_STYLE = debugging
 
 // Let the user install by specifying the $DSTROOT with xcodebuild
 SKIP_INSTALL = NO
+
+OTHER_LDFLAGS = ;
index d0d38f0..ada32a2 100644 (file)
@@ -1,3 +1,12 @@
+2013-07-23  David Farler  <dfarler@apple.com> 
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS.
+
 2013-08-05  Mark Rowe  <mrowe@apple.com>
 
         Build fix for Qt Windows.
index 06006ea..65abcc8 100644 (file)
@@ -36,3 +36,5 @@ MACOSX_DEPLOYMENT_TARGET_macosx_1090 = 10.9;
 
 GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
 DEBUG_INFORMATION_FORMAT = dwarf;
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
index 97f660b..f34a5a2 100644 (file)
@@ -1,3 +1,23 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        No new tests necessary.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * Configurations/WebCore.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * Configurations/WebCoreTestShim.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * Configurations/WebCoreTestSupport.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * WebCore.xcodeproj/project.pbxproj:
+        Don't use ASAN for build tools.
+
 2013-08-05  Rob Buis  <rwlbuis@webkit.org>
 
         SVG stroke-dasharray is not animatable
index 41df04d..3e241ce 100644 (file)
@@ -19,7 +19,7 @@
 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "Base.xcconfig"
 
@@ -44,3 +44,7 @@ DEBUG_INFORMATION_FORMAT = dwarf;
 SECTORDER_FLAGS = ;
 
 WEBCORE_SQLITE3_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/WebCoreSQLite3;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index 0cdc0d3..dda99a4 100644 (file)
@@ -62,7 +62,7 @@ INSTALLHDRS_COPY_PHASE = YES;
 INSTALLHDRS_SCRIPT_PHASE = YES;
 PRODUCT_NAME = WebCore;
 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport;
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework QuartzCore;
 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
 OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebKit2 -framework IOSurface;
index 07250d5..f63215e 100644 (file)
@@ -37,5 +37,5 @@ DYLIB_INSTALL_NAME_BASE_Release = $(DYLIB_INSTALL_NAME_BASE_Debug);
 PRODUCT_NAME = WebCoreTestShim;
 EXECUTABLE_PREFIX = lib;
 EXPORTED_SYMBOLS_FILE = ;
-OTHER_LDFLAGS = ;
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 SECTORDER_FLAGS = ;
index ad669ee..a19600b 100644 (file)
@@ -44,5 +44,5 @@ DYLIB_INSTALL_NAME_BASE_Release = $(DYLIB_INSTALL_NAME_BASE_Debug);
 PRODUCT_NAME = WebCoreTestSupport;
 EXECUTABLE_PREFIX = lib;
 EXPORTED_SYMBOLS_FILE = ;
-OTHER_LDFLAGS = ;
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 SECTORDER_FLAGS = ;
index 9009a3a..cb3d39a 100644 (file)
                                EXPORTED_SYMBOLS_FILE = "";
                                GCC_OPTIMIZATION_LEVEL = 0;
                                INSTALL_PATH = /usr/local/bin;
+                               OTHER_CFLAGS = "";
+                               OTHER_CPLUSPLUSFLAGS = "";
                                OTHER_LDFLAGS = "";
                                PRODUCT_NAME = WebCoreExportFileGenerator;
                                SKIP_INSTALL = YES;
                        buildSettings = {
                                EXPORTED_SYMBOLS_FILE = "";
                                INSTALL_PATH = /usr/local/bin;
+                               OTHER_CFLAGS = "";
+                               OTHER_CPLUSPLUSFLAGS = "";
                                OTHER_LDFLAGS = "";
                                PRODUCT_NAME = WebCoreExportFileGenerator;
                                SKIP_INSTALL = YES;
index 6b95bbc..11eb5f0 100644 (file)
@@ -1,3 +1,13 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+
 2013-07-30  Roland Takács  <rtakacs@inf.u-szeged.hu>
 
         Web Inspector: doesn't use localized user interface at remote inspector
index 25d03ff..b93418b 100644 (file)
@@ -16,3 +16,7 @@ DEBUG_INFORMATION_FORMAT = dwarf;
 RUN_CLANG_STATIC_ANALYZER = YES;
 
 WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(BUILT_PRODUCTS_DIR);
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index ec118d8..5f32572 100644 (file)
@@ -1,3 +1,15 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * Configurations/WebKit.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+
 2013-07-26  Mark Rowe  <mrowe@apple.com>
 
         Logging should be configurable using human-readable channel names rather than crazy bitmasks
index 645d278..8ee3758 100644 (file)
@@ -50,3 +50,7 @@ WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_macos
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1070 = WebKitSystemInterfaceLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1080 = WebKitSystemInterfaceMountainLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1090 = WebKitSystemInterfaceMountainLion;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index cfad0eb..797c557 100644 (file)
@@ -67,7 +67,7 @@ PRODUCT_NAME = WebKit;
 UMBRELLA_FRAMEWORKS_DIR = $(PRODUCTION_FRAMEWORKS_DIR)/WebKit.framework/Versions/A/Frameworks;
 
 OTHER_LDFLAGS_BASE = -licucore -framework JavaScriptCore -framework QuartzCore -framework WebCore;
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_BASE) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_iphoneos = -lobjc -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO;
 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
 OTHER_LDFLAGS_macosx = -sub_umbrella WebCore -framework Carbon -framework Cocoa -framework DiskArbitration -framework IOKit -framework OpenGL -framework Security;
index 91ddb58..3edf410 100644 (file)
@@ -1,3 +1,17 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * Configurations/WebContentProcess.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * Configurations/WebKit2.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+
 2013-08-06  Andreas Kling  <akling@apple.com>
 
         REGRESSION(r151403): Resizing is extremely laggy on many sites when plugins are disallowed.
index 4f43384..a9788ce 100644 (file)
@@ -42,4 +42,8 @@ WEBKIT_SYSTEM_INTERFACE_LIBRARY_1070 = WebKitSystemInterfaceLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_1080 = WebKitSystemInterfaceMountainLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_1090 = WebKitSystemInterfaceMountainLion;
 
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
+
 DEBUG_OR_RELEASE = YES;
index 6c61a55..07fd005 100644 (file)
@@ -26,7 +26,7 @@
 PRODUCT_NAME = WebProcess;
 INFOPLIST_FILE = WebProcess/EntryPoint/mac/LegacyProcess/Info.plist;
 
-OTHER_LDFLAGS = $(OTHER_LDFLAGS) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
 OTHER_LDFLAGS_macosx_1070 = -framework VideoDecodeAcceleration;
 OTHER_LDFLAGS_macosx_1080 = ;
index 12d680c..2bfa412 100644 (file)
@@ -31,7 +31,7 @@ DYLIB_INSTALL_NAME_BASE = $(NORMAL_WEBKIT2_FRAMEWORKS_DIR);
 
 FRAMEWORK_AND_LIBRARY_LDFLAGS = -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreServices -framework IOKit -framework JavaScriptCore -licucore -framework QuartzCore -framework Security -framework WebCore -framework CoreAudio;
 
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(PLATFORM_NAME)) $(OTHER_LDFLAGS);
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_macosx = $(FRAMEWORK_AND_LIBRARY_LDFLAGS);
 
 EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
index aef4a19..bec07ee 100644 (file)
@@ -1,3 +1,33 @@
+2013-07-23  David Farler  <dfarler@apple.com>
+
+        Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
+        https://bugs.webkit.org/show_bug.cgi?id=117762
+
+        Reviewed by Mark Rowe.
+
+        * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * MiniBrowser/Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * Scripts/check-for-weak-vtables-and-externals:
+        Ignore ___asan externals, these are populated by compiler-rt.
+        * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * WebKitLauncher/Configurations/Base.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * WebKitLauncher/Configurations/WebKitNightlyEnabler.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+        Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
+        * WebKitTestRunner/Configurations/InjectedBundle.xcconfig:
+        Add ASAN_OTHER_LDFLAGS.
+        * asan/asan.xcconfig: Added.
+        * asan/webkit-asan-ignore.txt: Added.
+
 2013-08-05  Brian Holt  <brian.holt@samsung.com>
 
         [GTK] Implement leak checking with valgrind
index fd5ebdb..b5f7bb1 100644 (file)
@@ -39,3 +39,6 @@ WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_macos
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1070 = WebKitSystemInterfaceLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1080 = WebKitSystemInterfaceMountainLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1090 = WebKitSystemInterfaceMountainLion;
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index cf0d22d..6b4c121 100644 (file)
@@ -21,7 +21,7 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 
-OTHER_LDFLAGS = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
+OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
 LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
 PRODUCT_NAME = DumpRenderTree
 GCC_ENABLE_OBJC_EXCEPTIONS = YES
index 084cdf9..01e06ef 100644 (file)
@@ -31,3 +31,7 @@ MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_
 MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
 MACOSX_DEPLOYMENT_TARGET_1080 = 10.8;
 MACOSX_DEPLOYMENT_TARGET_1090 = 10.9;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index dfbf89f..0175e2b 100755 (executable)
@@ -69,6 +69,9 @@ if (!defined $executablePathAge || !defined $buildTimestampAge || $executablePat
             # Ignore undefined, RTTI and typeinfo symbols.
             next if /\bundefined\b/ or /\b__ZT[IS]/;
 
+            # ASan compiler-rt calls into __asan_mapping_offset and __asan_mapping_scale
+            next if /\b___asan/;
+
             if (/weak external vtable for (.*)$/) {
                 push @weakVTableClasses, $1;
             } elsif (/weak external (.*)$/) {
index f681015..37d1596 100644 (file)
@@ -33,3 +33,7 @@ MACOSX_DEPLOYMENT_TARGET_1080 = 10.8;
 MACOSX_DEPLOYMENT_TARGET_1090 = 10.9;
 
 WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(BUILT_PRODUCTS_DIR);
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = -ftemplate-depth=256 $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index 5fc6f74..5c6c79e 100644 (file)
@@ -24,7 +24,7 @@
 PRODUCT_NAME = TestWebKitAPI;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 
-OTHER_LDFLAGS = -lgtest -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS = $(inherited) -lgtest -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_$(PLATFORM_NAME));
 OTHER_LDFLAGS_iphoneos = -framework WebCore;
 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
 OTHER_LDFLAGS_macosx = -framework Cocoa -framework Carbon -framework WebKit2;
index 5aceb3b..5f0393a 100644 (file)
@@ -35,3 +35,7 @@ SDKROOT = macosx;
 WARNING_CFLAGS = -Wall;
 
 ENABLE_SPARKLE = 0;
+
+OTHER_CFLAGS = $(inherited) $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(inherited) $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(inherited) $(ASAN_OTHER_LDFLAGS);
index ff352e6..27530a2 100644 (file)
@@ -24,6 +24,6 @@
 PRODUCT_NAME = WebKitNightlyEnabler;
 INSTALL_PATH = @executable_path/../Resources;
 
-OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(ENABLE_SPARKLE));
+OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(ENABLE_SPARKLE));
 OTHER_LDFLAGS_0 = ;
 OTHER_LDFLAGS_1 = -framework Sparkle;
index 5b97d12..f720c63 100644 (file)
@@ -41,3 +41,7 @@ WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx = $(WEBKIT_SYSTEM_INTERFACE_LIBRARY_macos
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1070 = WebKitSystemInterfaceLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1080 = WebKitSystemInterfaceMountainLion;
 WEBKIT_SYSTEM_INTERFACE_LIBRARY_macosx_1090 = WebKitSystemInterfaceMountainLion;
+
+OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
+OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS);
+OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
index 4235ead..c4e07e6 100644 (file)
@@ -26,4 +26,4 @@ PRODUCT_NAME = WebKitTestRunnerInjectedBundle;
 
 INSTALL_PATH = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Resources;
 SKIP_INSTALL = NO;
-OTHER_LDFLAGS = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
+OTHER_LDFLAGS = $(inherited) -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY);
diff --git a/Tools/asan/asan.xcconfig b/Tools/asan/asan.xcconfig
new file mode 100644 (file)
index 0000000..8b29fbc
--- /dev/null
@@ -0,0 +1,5 @@
+GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+
+ASAN_OTHER_CFLAGS = -fsanitize=address -O1 -mllvm -asan-blacklist=$(ASAN_IGNORE) -Wno-error -fno-omit-frame-pointer -g -DUSE_SYSTEM_MALLOC=1;
+ASAN_OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CFLAGS);
+ASAN_OTHER_LDFLAGS = -fsanitize=address -lclang_rt.asan_osx_dynamic;
diff --git a/Tools/asan/webkit-asan-ignore.txt b/Tools/asan/webkit-asan-ignore.txt
new file mode 100644 (file)
index 0000000..982a609
--- /dev/null
@@ -0,0 +1,4 @@
+fun:*genericAddSpan*
+fun:*gatherFromCurrentThread*ConservativeRoots*
+fun:*SetCookieStoragePrivateBrowsingEnabled*
+fun:*HTMLTreeBuilder*finished*