aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2019-03-21 13:46:31 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2019-03-22 08:26:33 +0000
commit61e6c0cc1b019b42d289bc146af1dc2440397cdc (patch)
treec6194854eeafe90a02cd70deedfdf066e8628787
parentb49287d25877ddeda6e6e8675cc45c675d9e4837 (diff)
Build libclang for qdoc from Qt llvm mirror repos
Apply the changes from build_clang.py to fetch the sources from code.qt.io. This also allows for building from custom branches, which is needed for patches for static builds. Task-number: QTBUG-71047 Change-Id: I56290bee12da7eee91a7d0469b3f4b3123278585 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r--packaging-tools/build_clang_qdoc.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/packaging-tools/build_clang_qdoc.py b/packaging-tools/build_clang_qdoc.py
index cc64e21a7..b1c840b79 100644
--- a/packaging-tools/build_clang_qdoc.py
+++ b/packaging-tools/build_clang_qdoc.py
@@ -52,23 +52,20 @@ import bldinstallercommon
import environmentfrombatchfile
import threadedwork
+def git_clone_and_checkout(base_path, remote_repository_url, directory, revision):
+ bld_utils.runCommand(['git', 'clone', '--no-checkout', remote_repository_url, directory], base_path)
+ local_repo_path = os.path.join(base_path, directory)
+ bld_utils.runCommand(['git', 'config', 'core.eol', 'lf'], local_repo_path)
+ bld_utils.runCommand(['git', 'config', 'core.autocrlf', 'input'], local_repo_path)
+ bld_utils.runCommand(['git', 'checkout', revision], local_repo_path)
+
def get_clang(base_path, llvm_revision, clang_revision, tools_revision):
- bld_utils.runCommand(['git', 'clone', '--no-checkout', 'git@github.com:llvm-mirror/llvm.git'], base_path)
- bld_utils.runCommand(['git', 'config', 'core.eol', 'lf'], os.path.join(base_path, 'llvm'))
- bld_utils.runCommand(['git', 'config', 'core.autocrlf', 'input'], os.path.join(base_path, 'llvm'))
- bld_utils.runCommand(['git', 'checkout', llvm_revision], os.path.join(base_path, 'llvm'))
- bld_utils.runCommand(['git', 'clone', '--no-checkout', 'git@github.com:llvm-mirror/clang.git'], os.path.join(base_path, 'llvm', 'tools'))
- bld_utils.runCommand(['git', 'config', 'core.eol', 'lf'], os.path.join(base_path, 'llvm', 'tools', 'clang'))
- bld_utils.runCommand(['git', 'config', 'core.autocrlf', 'input'], os.path.join(base_path, 'llvm', 'tools', 'clang'))
- bld_utils.runCommand(['git', 'checkout', clang_revision], os.path.join(base_path, 'llvm', 'tools', 'clang'))
- bld_utils.runCommand(['git', 'clone', '--no-checkout', 'git@github.com:llvm-mirror/clang-tools-extra.git', os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra')], '.')
- bld_utils.runCommand(['git', 'config', 'core.eol', 'lf'], os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra'))
- bld_utils.runCommand(['git', 'config', 'core.autocrlf', 'input'], os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra'))
- bld_utils.runCommand(['git', 'checkout', tools_revision], os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra'))
+ git_clone_and_checkout(base_path, 'git://code.qt.io/clang/llvm.git', 'llvm', llvm_revision)
+ git_clone_and_checkout(base_path, 'git://code.qt.io/clang/clang.git', 'llvm/tools/clang', clang_revision)
+ git_clone_and_checkout(base_path, 'git://code.qt.io/clang/clang-tools-extra.git', 'llvm/tools/clang/tools/extra', tools_revision)
def get_clazy(base_path, clazy_revision):
- bld_utils.runCommand(['git', 'clone', '--no-checkout', 'git@github.com:KDE/clazy.git'], os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra'))
- bld_utils.runCommand(['git', 'checkout', clazy_revision], os.path.join(base_path, 'llvm', 'tools', 'clang', 'tools', 'extra', 'clazy'))
+ git_clone_and_checkout(base_path, 'git://code.qt.io/clang/clazy.git', 'llvm/tools/clang/tools/extra/clazy', clazy_revision)
def msvc_version():
msvc_ver = os.environ.get('MSVC_VERSION')