Chromium Code Reviews| Index: build/mac/asan.gyp |
| diff --git a/build/mac/asan.gyp b/build/mac/asan.gyp |
| index 73e86416c6981ffffd6f9fa47985f16e6befffd3..8c6ed0ac4c7b73c99e9e06ebb0db39d4d9474222 100644 |
| --- a/build/mac/asan.gyp |
| +++ b/build/mac/asan.gyp |
| @@ -13,19 +13,64 @@ |
| 'prune_self_dependency': 1, |
| # Path is relative to this GYP file. |
| 'asan_rtl_mask_path': |
| - '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.asan_osx_dynamic.dylib', |
| + '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwin', |
| + 'asan_osx_dynamic': |
| + '<(asan_rtl_mask_path)/libclang_rt.asan_osx_dynamic.dylib', |
| + 'asan_iossim_dynamic': |
| + '<(asan_rtl_mask_path)/libclang_rt.asan_iossim_dynamic.dylib', |
| }, |
| + 'postbuilds': [ |
| + { |
| + 'variables': { |
| + # Define copy_asan_dylib_path in a variable ending in |
| + # _path so that gyp understands it's a path and |
| + # performs proper relativization during dict merging. |
|
Nico
2014/04/02 15:07:53
Is this necessary? asan_dynamic_runtime is a regul
|
| + 'copy_asan_dylib_path': |
| + 'mac/copy_asan_runtime_dylib.sh', |
|
Nico
2014/04/02 15:07:53
This script checks if "${BUILT_PRODUCTS_DIR}/${EXE
|
| + }, |
| + 'postbuild_name': 'Copy ASan runtime dylib', |
| + 'action': [ |
| + '<(copy_asan_dylib_path)', |
| + ], |
| + }, |
| + ], |
| 'conditions': [ |
| ['OS=="mac"', { |
| 'copies': [ |
| { |
| 'destination': '<(PRODUCT_DIR)', |
| 'files': [ |
| - '<!(/bin/ls <(asan_rtl_mask_path))', |
| + '<!(/bin/ls <(asan_osx_dynamic))', |
| ], |
| }, |
| ], |
| }], |
| + # ASan works with iOS simulator only, not bare-metal iOS. |
| + ['OS=="ios" and target_arch=="ia32"', { |
| + 'toolsets': ['host', 'target'], |
| + 'target_conditions': [ |
| + ['_toolset=="host"', { |
| + 'copies': [ |
| + { |
| + 'destination': '<(PRODUCT_DIR)', |
| + 'files': [ |
| + '<!(/bin/ls <(asan_osx_dynamic))', |
| + ], |
| + }, |
| + ], |
| + }], |
| + ['_toolset=="target"', { |
| + 'copies': [ |
| + { |
| + 'destination': '<(PRODUCT_DIR)', |
| + 'files': [ |
| + '<!(/bin/ls <(asan_iossim_dynamic))', |
| + ], |
| + }, |
| + ], |
| + }], |
| + ], |
| + }], |
| ], |
| }, |
| ], |