OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'targets': [ | 6 'targets': [ |
7 { | 7 { |
8 'target_name': 'asan_dynamic_runtime', | 8 'target_name': 'asan_dynamic_runtime', |
9 'type': 'none', | 9 'type': 'none', |
10 'variables': { | 10 'variables': { |
11 # Every target is going to depend on asan_dynamic_runtime, so allow | 11 # Every target is going to depend on asan_dynamic_runtime, so allow |
12 # this one to depend on itself. | 12 # this one to depend on itself. |
13 'prune_self_dependency': 1, | 13 'prune_self_dependency': 1, |
14 # Path is relative to this GYP file. | 14 # Path is relative to this GYP file. |
15 'asan_rtl_mask_path': | 15 'asan_rtl_mask_path': |
16 '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwi n/libclang_rt.asan_osx_dynamic.dylib', | 16 '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwi n', |
17 'asan_osx_dynamic': | |
18 '<(asan_rtl_mask_path)/libclang_rt.asan_osx_dynamic.dylib', | |
19 'asan_iossim_dynamic': | |
20 '<(asan_rtl_mask_path)/libclang_rt.asan_iossim_dynamic.dylib', | |
17 }, | 21 }, |
22 'postbuilds': [ | |
Nico
2014/04/02 02:46:04
Why does mac require a postbuild now?
| |
23 { | |
24 'variables': { | |
25 # Define copy_asan_dylib_path in a variable ending in | |
26 # _path so that gyp understands it's a path and | |
27 # performs proper relativization during dict merging. | |
28 'copy_asan_dylib_path': | |
29 'mac/copy_asan_runtime_dylib.sh', | |
30 }, | |
31 'postbuild_name': 'Copy ASan runtime dylib', | |
32 'action': [ | |
33 '<(copy_asan_dylib_path)', | |
34 ], | |
35 }, | |
36 ], | |
18 'conditions': [ | 37 'conditions': [ |
19 ['OS=="mac"', { | 38 ['OS=="mac"', { |
20 'copies': [ | 39 'copies': [ |
21 { | 40 { |
22 'destination': '<(PRODUCT_DIR)', | 41 'destination': '<(PRODUCT_DIR)', |
23 'files': [ | 42 'files': [ |
24 '<!(/bin/ls <(asan_rtl_mask_path))', | 43 '<!(/bin/ls <(asan_osx_dynamic))', |
25 ], | 44 ], |
26 }, | 45 }, |
27 ], | 46 ], |
28 }], | 47 }], |
48 # ASan works with iOS simulator only, not bare-metal iOS. | |
49 ['OS=="ios" and target_arch=="ia32"', { | |
50 'toolsets': ['host', 'target'], | |
51 'target_conditions': [ | |
52 ['_toolset=="host"', { | |
53 'copies': [ | |
54 { | |
55 'destination': '<(PRODUCT_DIR)', | |
56 'files': [ | |
57 '<!(/bin/ls <(asan_osx_dynamic))', | |
58 ], | |
59 }, | |
60 ], | |
61 }], | |
62 ['_toolset=="target"', { | |
63 'copies': [ | |
64 { | |
65 'destination': '<(PRODUCT_DIR)', | |
66 'files': [ | |
67 '<!(/bin/ls <(asan_iossim_dynamic))', | |
68 ], | |
69 }, | |
70 ], | |
71 }], | |
72 ], | |
73 }], | |
29 ], | 74 ], |
30 }, | 75 }, |
31 ], | 76 ], |
32 } | 77 } |
OLD | NEW |