build 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. [% c("var/set_default_env") -%]
  3. tar -xf $rootdir/[% c('input_files_by_name/llvm') %]
  4. tar -xf $rootdir/[% c('input_files_by_name/clang') %]
  5. tar -xf $rootdir/[% c('input_files_by_name/clang-tools-extra') %]
  6. tar -xf $rootdir/[% c('input_files_by_name/libcxx') %]
  7. tar -xf $rootdir/[% c('input_files_by_name/libcxxabi') %]
  8. tar -xf $rootdir/[% c('input_files_by_name/lld') %]
  9. tar -xf $rootdir/[% c('input_files_by_name/compiler-rt') %]
  10. tar -xf $rootdir/[% c('input_files_by_name/libunwind') %]
  11. mv llvm-[% c("version") %].src llvm
  12. # LLVM has reproducibility issues when optimizing bitcode, which we need to
  13. # patch. See: #32053 for more details.
  14. patch -p1 < $rootdir/43909.patch
  15. mv clang-[% c("version") %].src llvm/tools/clang
  16. # Having clang-tidy available seems like a good idea
  17. mv clang-tools-extra-[% c("version") %].src llvm/tools/clang/tools/extra
  18. mv libcxx-[% c("version") %].src llvm/projects/libcxx
  19. mv libcxxabi-[% c("version") %].src llvm/projects/libcxxabi
  20. mv lld-[% c("version") %].src llvm/tools/lld
  21. mv compiler-rt-[% c("version") %].src llvm/projects/compiler-rt
  22. # We need libunwind only for mingw-w64-clang, don't include it as tightly by
  23. # putting it into projects/
  24. mv libunwind-[% c("version") %].src llvm/libunwind
  25. mv llvm [% project %]
  26. [% c('tar', {
  27. tar_src => [ project ],
  28. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  29. }) %]