Changes between Version 3 and Version 4 of ASanWebKit
- Timestamp:
- Nov 5, 2014 8:52:27 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ASanWebKit
v3 v4 16 16 /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/ 17 17 }}} 18 3. Make a copy of the `OSX10.9.xctoolchain` and call it `ASAN.xctoolchain`: 18 With Xcode 6.1 on 10.9.5, the SDK is in: 19 {{{ 20 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ 21 }}} 22 3. Make a copy of the `OSX10.9.xctoolchain`(or `XcodeDefault.xctoolchain`) and call it `ASAN.xctoolchain`: 19 23 {{{ 20 24 sudo ditto /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain 21 25 }}} 22 4. Edit `ASAN.xctoolchain/ToolchainInfo.plist` to change the `Identifier` string from `com.apple.dt.toolchain.OSX10_9` to `com.apple.dt.toolchain.ASAN`. 26 4. Edit `ASAN.xctoolchain/ToolchainInfo.plist` to change the `Identifier` string from `com.apple.dt.toolchain.OSX10_9` to `com.apple.dt.toolchain.ASAN`. (with Xcode 6.1 on 10.9.5, the `Identifier` is `com.apple.dt.toolchain.XcodeDefault`) 23 27 {{{ 24 28 sudo vi /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain/ToolchainInfo.plist 25 29 }}} 26 30 5. Build trunk clang/llvm. The address sanitizer should be built by default for Mac OS X. See [http://www.llvm.org/docs/ LLVM Docs] for details. Subversion revision r204316 of clang/llvm is known to build WebKit for Mac OS X. Newer versions may introduce new warnings or compiler bugs that must be fixed before proceeding. Alternatively, you can download a prebuilt binary from the [http://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Mac/ Chromium Browser Clang] page. 27 6. Ditto the clang/llvm build output into `/Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain` to replace the version of clang/llvm in the original toolchain. 31 6. Ditto the clang/llvm build output into `/Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain` to replace the version of clang/llvm in the original toolchain. If you downloaded a build from the [http://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Mac/ Chromium Browser Clang] page, then it should be as simple as: 28 32 {{{ 29 TBD 33 sudo ditto ~/Downloads/clang-218707/ /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain/usr/ 30 34 }}} 35 Replacing `~/Downloads/clang-218707/` with the location you extracted the clang archive to. Note that the trailing / on the path is important! 31 36 7. Fix the ID of `libclang_rt.asan_osx_dynamic.dylib` to its installation path using the `install_name_tool`: 32 37 {{{ 33 38 sudo xcrun install_name_tool -id /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain/usr/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain/usr/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib 34 39 }}} 40 You may have to change the `3.5.0` in the paths to match the version of clang you are using, especially if you download a build from the [http://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Mac/ Chromium Browser Clang] page.. 35 41 8. Copy `libclang_rt.asan_osx_dynamic.dylib` into your `WebKitBuild/Release` directory: 36 42 {{{ 37 43 ditto /Applications/Xcode.app/Contents/Developer/Toolchains/ASAN.xctoolchain/usr/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib WebKitBuild/Release/ 38 44 }}} 45 You may have to change the `3.5.0` in the paths to match the version of clang you are using, especially if you download a build from the [http://commondatastorage.googleapis.com/chromium-browser-clang/index.html?path=Mac/ Chromium Browser Clang] page. 39 46 9. Build WebKit with additional xcodebuild arguments to load `asan.xcconfig`, find the ASan ignore list, and build with the new compiler: 40 47 {{{