Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Side by Side Diff: build/config/sanitizers/copy_asan_runtime_mac.py

Issue 2180653002: Attempt to fix Mac ASAN build in GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import argparse
6 import os
7 import shutil
8 import subprocess
9 import sys
10
11 if __name__ == '__main__':
12 parser = argparse.ArgumentParser(
13 description='Copy the checked-in asan runtime and reset the rpath')
14 parser.add_argument('input_path', nargs=1)
15 parser.add_argument('output_path', nargs=1)
16 args = parser.parse_args()
17
18 input_file = args.input_path[0]
19 output_file = args.output_path[0]
20 basename = os.path.basename(input_file)
21 if os.path.exists(output_file):
22 os.unlink(output_file)
23 shutil.copy(input_file, output_file)
24 rv = subprocess.check_call([
25 'xcrun',
26 'install_name_tool',
27 '-add_rpath',
28 '@rpath/' + basename,
29 output_file])
30 if rv:
31 os.unlink(output_file)
32 sys.exit(rv)
OLDNEW
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698