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 a13d08c2f77095e51bc74e38cbb58e07a2f8356c..f2895b87e4e03c4a3a9a858ad4adb970f6aa6a84 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 bf2c8d19a4fbe18aa03e24afe0796963e5e678ff..e6e86daf5c09cf6bcac5b976b2c71ab5640bfc14 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 c779de44781526e82ce6bc78cf1be737defdb956..0c8fd9ff4af6742c9a8c6eb64eafb908bb47da48 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 a91c75730af3d6df548ceae8a1d3cfe95c6de561..73c7f0c1c7ba094b2ec0a5f78d3990459a9fcadb 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 05ecd7d00b0436c8582e012c11f3cdedfc9deade..30c9b3df3c14090e07facfbd53bd7b448b2e5d9a 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 f1a0b246bd682787451f4b6fcd1431756d221bcc..ec771eee0616df73f8ac3a31300332033e3c75e6 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 d5b1615203eecaba24c36636196038fe9bab2d5b..162f078f48b06def0c8b71a1975591b0be181a21 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 2074fd5f0b53a89ae42d850c90b88833bd21adb2..9a7ed13b64bdf8fcde42f692a10c8e3e47e0799c 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 3922fa51d52d5ff0f3046ff51c0ad6a96fb48be4..dd33255a94477020cf11f7055e44ae2528eb9f97 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 d0d38f03e6a4ac89b513be9d91ac580ff187b9a6..ada32a2a8a26286be707ce82ef4f56d7a20957e9 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 06006ea0c0ac9e846f565ddfd4dafe67472f406c..65abcc88e9901093b7fd8dbbdd94059f35db1cf4 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 97f660bb1317515f751553330c9d0d5ce553e3e2..f34a5a2994527ff2fca85f458a7491fddfe07bf2 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 41df04ddfdf43da7a61d7de1cd9210271f51b648..3e241cea20555a97d88975b71f25e15927fd7659 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 0cdc0d3bdcb34cd2a257c51db1577b23d3d7d154..dda99a46a56d97bf17f56b1df0661ac0a0e71055 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 07250d5bb16dbbd5a3a1af72b69348460a7f7ba7..f63215e797e607f154e5f1b3529170f74fbc7d0e 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 ad669ee471d7415e5d547ae4f7f5e74fea74190d..a19600b30992d91dba1524fe92e90fd805ac496b 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 9009a3ab873d625effbbd2d5687ac703a96ecaf6..cb3d39ab5094b8fa140b89a2542cfe2de1aac0b7 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 6b95bbcc5b0daca9ad1de5e153b35cd24ed2e7ff..11eb5f08a0b3bc606444bcf0341e9d6d3c0927f7 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 25d03ff84f1848da9e886fabff1077aaf88a0d64..b93418b2c5eb9b4548fd2a0a480d39b2f4504526 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 ec118d8a820096c58610577945ec78127ea98759..5f3257211ffca973153cb62d274f7597a7f40c10 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 645d2786fa0d4396d2c4450b71be95ef9ec66043..8ee3758474d8dca13dd8d4c70fe1ce8111b43b0e 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 cfad0eb0e0ee3d102cddc4d02b883f3f4bc1481d..797c557faffe3d3565b921bc9c653037a927a46e 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 91ddb582a479cd6af689f7bc5b26a17da5e06912..3edf4107ac30c783952f07d80525938eeb0608c1 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 4f433844b39f976b0cf4e7512781aa6f10c50fc5..a9788ce4df42384a3b293e81bd8db0bed8249f17 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 6c61a5505a9c33eab2cc928530781751a4cc0f61..07fd005cd22c3fd09eb9ddfeef4ab36cfb1174ae 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 12d680c9c2887d81bec1e8343a09b78bedd182f1..2bfa4121ecc3d5f286e9a326fc63661b2f7be11f 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 aef4a194817c4f2b9d4569084161b81c1cd46535..bec07ee48818f8dc4d2c0982a58c3ce5a70949d9 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 fd5ebdbd1f08525d3a6a0494fa4ee7722f2121a7..b5f7bb1df29917247a75d2f1d32ffedd550c86e9 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 cf0d22d0cedd34dc1ebf03b358c1b346f364a3e6..6b4c121401cbfa53d2f759d1d63c8cfe3f6a056e 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 084cdf91e891ec047358c2556e4da603b06bc976..01e06eff9c28080a5cb585e96e39f839bfc7355e 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 dfbf89feff45548ba0fceea4bdaf8bf19e4614dc..0175e2b4f253cba73ddbf4e69f6a58a97ad1647b 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 f681015b8e36e89d934dfd9c5daf2054da61c5f2..37d15965767744553a3719bdd8d143630664e43e 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 5fc6f744945e9e2733d8fff29c357c5c2ca5bd8a..5c6c79ef2399177109fe8819f6fae4bd65c0645f 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 5aceb3bd028d0478c43c08fd6dabe165c013154f..5f0393ac54520a61f0c953f165cb2b56dd2a3e88 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 ff352e66a9e97d9ced9979c13651c96c4d086d49..27530a26c989c861e20cf36f99b010973868a3dd 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 5b97d12723ee86d1b6e0c3d86694810d25fd4b39..f720c63224e006e3985253ea0cd86464c1909e1b 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 4235ead85ab2d36103acc93c97556f6caf8ad631..c4e07e6edef0c4d0686cd52c370b98d2bb982ab7 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*