OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import sys | 10 import sys |
11 | 11 |
12 from pylib import build_utils | 12 from util import build_utils |
13 | 13 |
14 def DoGcc(options): | 14 def DoGcc(options): |
15 build_utils.MakeDirectory(os.path.dirname(options.output)) | 15 build_utils.MakeDirectory(os.path.dirname(options.output)) |
16 | 16 |
17 gcc_cmd = [ | 17 gcc_cmd = [ |
18 'gcc', # invoke host gcc. | 18 'gcc', # invoke host gcc. |
19 '-E', # stop after preprocessing. | 19 '-E', # stop after preprocessing. |
20 '-D', 'ANDROID', # Specify ANDROID define for pre-processor. | 20 '-D', 'ANDROID', # Specify ANDROID define for pre-processor. |
21 '-x', 'c-header', # treat sources as C header files | 21 '-x', 'c-header', # treat sources as C header files |
22 '-P', # disable line markers, i.e. '#line 309' | 22 '-P', # disable line markers, i.e. '#line 309' |
(...skipping 20 matching lines...) Expand all Loading... |
43 DoGcc(options) | 43 DoGcc(options) |
44 | 44 |
45 if options.stamp: | 45 if options.stamp: |
46 build_utils.Touch(options.stamp) | 46 build_utils.Touch(options.stamp) |
47 | 47 |
48 | 48 |
49 if __name__ == '__main__': | 49 if __name__ == '__main__': |
50 sys.exit(main(sys.argv)) | 50 sys.exit(main(sys.argv)) |
51 | 51 |
52 | 52 |
OLD | NEW |