You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 line
3.0KB

  1. SHELL:=/bin/bash
  2. iv8:
  3. # git clone https://github.com/rayburgemeestre/v8pp
  4. #
  5. git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git || true
  6. # will be factored out at some point
  7. git clone https://github.com/pmed/v8pp || true
  8. pushd v8pp && git checkout 8ad6c07b13a811d9132c202f48b4a902d5685a98 # master at time of writing
  9. bash ../ubuntu1804.sh make build
  10. bash ../ubuntu1804.sh make archive # outside container not enough permissions
  11. bash ../ubuntu1804.sh make package # outside container not enough permissions
  12. # also packages v8pp for now
  13. make fpm_package
  14. build:
  15. update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-9 40
  16. update-alternatives --install /usr/bin/cc cc /usr/bin/clang-9 40
  17. update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-9 40
  18. update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 40
  19. update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-9 40
  20. apt-get update
  21. apt-get install pkg-config -y
  22. ./build-v8.sh
  23. archive:
  24. rm -rf v8.a
  25. #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  26. # third_party/
  27. # excluding buildtools/third_party directory which contains libc++ etc., or you will get linker errors.
  28. # ./out/x64.release/obj/buildtools/third_party/libc++/libc++/
  29. # second exclude for external snapshot, we need only the non-external one, or we get some weeiiird results of course!
  30. # both implement DefaultSnapshotBlob() and we need to add the right one to the object file.
  31. # ERR, ar rvs v8.a $$(find ./v8/out/x64.release/ -type f -name '*.o' | grep -v "buildtools/third_party/libc++/libc++" | grep -v "v8_external_snapshot")
  32. # Let's go back to our white-list approach.. let's see...
  33. #ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  34. # We no longer use our v8.a, still including it for now.
  35. echo all included object files listed below
  36. ar rvs v8.a $$(cat v8-include.txt |xargs -n 1 -I{} find {} -name '*.o')
  37. # We'll use this one below..
  38. find ./v8/out/x64.release/ -name 'libv8_monolith.a' -type f
  39. # We'll also include .so files..
  40. find ./v8/out/x64.release/ -name '*.so' -type f
  41. package:
  42. rm -rf out
  43. rm -rf v8pp_*_amd64.deb
  44. mkdir -p out/opt/cppse/build/v8pp/lib
  45. mkdir -p out/opt/cppse/build/v8pp/include
  46. # Legacy include our own v8.a
  47. cp -prv v8.a out/opt/cppse/build/v8pp/lib
  48. cp -prv v8/out/x64.release/obj/libv8_monolith.a out/opt/cppse/build/v8pp/lib
  49. # We'll also include .so files..
  50. find ./v8/out/x64.release/ -name '*.so' -type f | xargs -n 1 cp -prv -t out/opt/cppse/build/v8pp/lib
  51. cp -prv v8pp/v8pp out/opt/cppse/build/v8pp/include/
  52. cp -prv v8/include out/opt/cppse/build/v8pp/include/v8
  53. fpm_package:
  54. docker run -v "$$(pwd):/src/" rayburgemeestre/fpm-ubuntu:18.04 fpm -v 1.1 -s dir -t deb -n v8pp --license MPL2 --maintainer "Ray Burgemeestre <ray@cppse.nl>" --description "v8pp - build dependency" --url "https://github.com/rayburgemeestre/v8pp" --deb-generate-changes -C /src/out
  55. clean:
  56. rm -rf v8pp
  57. rm -rf v8
  58. rm -rf out
  59. rm -rf depot_tools
  60. shell:
  61. FLAGS="-i --privileged" bash ../ubuntu1804.sh /bin/bash