build 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  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. [% IF ! c("var/windows") -%]
  13. # LLVM has reproducibility issues when optimizing bitcode, which we need to
  14. # patch. See: #32053 for more details.
  15. patch -p1 < $rootdir/43909.patch
  16. [% END -%]
  17. mv clang-[% c("version") %].src llvm/tools/clang
  18. # Having clang-tidy available seems like a good idea
  19. mv clang-tools-extra-[% c("version") %].src llvm/tools/clang/tools/extra
  20. mv libcxx-[% c("version") %].src llvm/projects/libcxx
  21. mv libcxxabi-[% c("version") %].src llvm/projects/libcxxabi
  22. mv lld-[% c("version") %].src llvm/tools/lld
  23. mv compiler-rt-[% c("version") %].src llvm/projects/compiler-rt
  24. # We need libunwind only for mingw-w64-clang, don't include it as tightly by
  25. # putting it into projects/
  26. mv libunwind-[% c("version") %].src llvm/libunwind
  27. mv llvm [% project %]
  28. [% c('tar', {
  29. tar_src => [ project ],
  30. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  31. }) %]