build 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. [% IF c("var/osname") == "linux-armhf" -%]
  27. mv libunwind-[% c("version") %].src llvm/projects/libunwind
  28. [% ELSE -%]
  29. mv libunwind-[% c("version") %].src llvm/libunwind
  30. [% END %]
  31. mv llvm [% project %]
  32. [% c('tar', {
  33. tar_src => [ project ],
  34. tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
  35. }) %]