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

Side by Side Diff: tools/clang/scripts/update.py

Issue 2896663002: Package the translation_unit tool as part of building the clang package. (Closed)
Patch Set: don't include unistd.h Created 3 years, 7 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
OLDNEW
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 """This script is used to download prebuilt clang binaries. 6 """This script is used to download prebuilt clang binaries.
7 7
8 It is also used by package.py to build the prebuilt clang binaries.""" 8 It is also used by package.py to build the prebuilt clang binaries."""
9 9
10 import argparse 10 import argparse
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 if deployment_target: 636 if deployment_target:
637 deployment_env = os.environ.copy() 637 deployment_env = os.environ.copy()
638 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target 638 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target
639 639
640 cmake_args = [] 640 cmake_args = []
641 # TODO(thakis): Unconditionally append this to base_cmake_args instead once 641 # TODO(thakis): Unconditionally append this to base_cmake_args instead once
642 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) 642 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698)
643 cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args 643 cc_args = base_cmake_args if sys.platform != 'win32' else cmake_args
644 if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc) 644 if cc is not None: cc_args.append('-DCMAKE_C_COMPILER=' + cc)
645 if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx) 645 if cxx is not None: cc_args.append('-DCMAKE_CXX_COMPILER=' + cxx)
646 chrome_tools = list(set(['plugins', 'blink_gc_plugin'] + args.extra_tools)) 646 default_tools = ['plugins', 'blink_gc_plugin', 'translation_unit']
647 chrome_tools = list(set(default_tools + args.extra_tools))
647 cmake_args += base_cmake_args + [ 648 cmake_args += base_cmake_args + [
648 '-DLLVM_ENABLE_THREADS=OFF', 649 '-DLLVM_ENABLE_THREADS=OFF',
649 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir, 650 '-DLLVM_BINUTILS_INCDIR=' + binutils_incdir,
650 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), 651 '-DCMAKE_C_FLAGS=' + ' '.join(cflags),
651 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags), 652 '-DCMAKE_CXX_FLAGS=' + ' '.join(cxxflags),
652 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags), 653 '-DCMAKE_EXE_LINKER_FLAGS=' + ' '.join(ldflags),
653 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags), 654 '-DCMAKE_SHARED_LINKER_FLAGS=' + ' '.join(ldflags),
654 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags), 655 '-DCMAKE_MODULE_LINKER_FLAGS=' + ' '.join(ldflags),
655 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR, 656 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BUILD_DIR,
656 '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'), 657 '-DCHROMIUM_TOOLS_SRC=%s' % os.path.join(CHROMIUM_DIR, 'tools', 'clang'),
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 args.force_local_build = True 915 args.force_local_build = True
915 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): 916 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
916 # Only build the Android ASan rt on ToT bots when targetting Android. 917 # Only build the Android ASan rt on ToT bots when targetting Android.
917 args.with_android = False 918 args.with_android = False
918 919
919 return UpdateClang(args) 920 return UpdateClang(args)
920 921
921 922
922 if __name__ == '__main__': 923 if __name__ == '__main__':
923 sys.exit(main()) 924 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/clang/scripts/package.py ('k') | tools/clang/translation_unit/TranslationUnitGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698