OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """A tool to build chrome, executed by buildbot. | 6 """A tool to build chrome, executed by buildbot. |
7 | 7 |
8 When this is run, the current directory (cwd) should be the outer build | 8 When this is run, the current directory (cwd) should be the outer build |
9 directory (e.g., chrome-release/build/). | 9 directory (e.g., chrome-release/build/). |
10 | 10 |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 assert options.goma_dir is None | 932 assert options.goma_dir is None |
933 | 933 |
934 # ninja is different from all the other build systems in that it requires | 934 # ninja is different from all the other build systems in that it requires |
935 # most configuration to be done at gyp time. This is why this function does | 935 # most configuration to be done at gyp time. This is why this function does |
936 # less than the other comparable functions in this file. | 936 # less than the other comparable functions in this file. |
937 print 'chdir to %s' % options.src_dir | 937 print 'chdir to %s' % options.src_dir |
938 os.chdir(options.src_dir) | 938 os.chdir(options.src_dir) |
939 | 939 |
940 command = ['ninja', '-w', 'dupbuild=err', '-C', options.target_output_dir] | 940 command = ['ninja', '-w', 'dupbuild=err', '-C', options.target_output_dir] |
941 | 941 |
| 942 if chromium_utils.IsLinux() and options.compiler in ('clang', 'goma-clang'): |
| 943 clang_lib_dir = os.path.abspath(os.path.join(options.src_dir, |
| 944 'third_party', 'llvm-build', 'Release+Asserts', 'lib')) |
| 945 if not 'LD_LIBRARY_PATH' in env: |
| 946 env['LD_LIBRARY_PATH'] = '' |
| 947 env['LD_LIBRARY_PATH'] += clang_lib_dir + ':' |
| 948 |
942 # HACK(yyanagisawa): update environment files on |env| update. | 949 # HACK(yyanagisawa): update environment files on |env| update. |
943 # For compiling on Windows, environment in environment files are used. | 950 # For compiling on Windows, environment in environment files are used. |
944 # It means even if enviroment such as GOMA_DISABLED is updated in | 951 # It means even if enviroment such as GOMA_DISABLED is updated in |
945 # compile.py, the update will be ignored. | 952 # compile.py, the update will be ignored. |
946 # We need to update environment files to reflect the update. | 953 # We need to update environment files to reflect the update. |
947 if chromium_utils.IsWindows() and NeedEnvFileUpdateOnWin(env): | 954 if chromium_utils.IsWindows() and NeedEnvFileUpdateOnWin(env): |
948 print 'Updating environment.{x86,x64} files.' | 955 print 'Updating environment.{x86,x64} files.' |
949 UpdateWindowsEnvironment(options.target_output_dir, env) | 956 UpdateWindowsEnvironment(options.target_output_dir, env) |
950 | 957 |
951 if options.clobber: | 958 if options.clobber: |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) | 1385 sys.stderr.write('Unknown build tool %s.\n' % repr(options.build_tool)) |
1379 return 2 | 1386 return 2 |
1380 | 1387 |
1381 options.target_output_dir = get_target_build_dir(args, options) | 1388 options.target_output_dir = get_target_build_dir(args, options) |
1382 | 1389 |
1383 return main(options, args) | 1390 return main(options, args) |
1384 | 1391 |
1385 | 1392 |
1386 if '__main__' == __name__: | 1393 if '__main__' == __name__: |
1387 sys.exit(real_main()) | 1394 sys.exit(real_main()) |
OLD | NEW |