Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

65 linhas
2.8KB

  1. #!/bin/bash
  2. set -ex
  3. export PATH=`pwd`/depot_tools:"$PATH"
  4. # https://github.com/prahladyeri/tuxdrive/issues/3
  5. apt-get install python3-pip -y
  6. pip3 install httplib2 --upgrade
  7. fetch v8
  8. cd v8 # if this fails, exit! hence the set -ex
  9. #gclient sync -r 6.9.427.6 # 55da769bafac8b531cd8b388df56161b8b7c6416
  10. #gclient sync -r 7.1.69 #
  11. #gclient sync -r lkgr/6.9
  12. #gclient sync -r 6.9.427.13 # https://ci.appveyor.com/project/pmed/v8pp
  13. #gclient sync -r 7.5.288.23 # https://github.com/pmed/v8-nuget/
  14. #gclient sync -r 8.0.426.15 # stupid test
  15. #gclient sync -r 7.2.1 # stupid test
  16. gclient sync -r 8.2.297.1 # https://github.com/pmed/v8-nuget/
  17. # Looks like we have to use GN now: https://github.com/v8/v8/wiki/Building-with-GN
  18. # initial build
  19. # temp
  20. #rm -rf out/x64.release
  21. ./tools/dev/gm.py x64.release
  22. # we don't want std::_Cr, but std::__1 like everybody else is using
  23. # note that this is only relevant if use_custom_libcxx = true.
  24. # unfortunately I don't know how to specify v8 to use libc++ from the system
  25. # I asked a question about this here: https://groups.google.com/forum/#!topic/v8-users/Do5MvAvYFgs
  26. sed -i.bak 's/_LIBCPP_ABI_VERSION=Cr/_LIBCPP_ABI_VERSION=1/' build/config/c++/BUILD.gn
  27. # workaround, see notes.txt
  28. echo "v8_enable_embedded_builtins = false" | tee -a out/x64.release/args.gn
  29. echo "v8_use_external_startup_data = false" | tee -a out/x64.release/args.gn
  30. echo "v8_use_snapshot = false" | tee -a out/x64.release/args.gn
  31. # set below to true to make it use libc++ (although it will use the one it is bundled with,
  32. # and also it will enable unsafe abi stuff, which means basically alpha features afaik)
  33. echo "use_custom_libcxx = false" | tee -a out/x64.release/args.gn
  34. # possibly they use a different version of clang compiling v8.
  35. # however, I already set my own, probably newer clang version.
  36. # ran into: https://groups.google.com/forum/#!topic/v8-users/Jb1VSouy2Z0
  37. #echo "is_clang = false" | tee -a out/x64.release/args.gn
  38. # setting to true now, and see if we use this clang on starcry if it works..
  39. echo "is_clang = true" | tee -a out/x64.release/args.gn
  40. # the only remaining issue was: undefined reference to `typeinfo for v8::ArrayBuffer::Allocator'
  41. # this is the case with (gnu) libstd++ , only remaining issue for me
  42. # https://github.com/danbev/learning-v8/pull/4
  43. echo "use_rtti = true" | tee -a out/x64.release/args.gn
  44. # produce monolith (single static all in one .a file)
  45. echo "v8_monolithic = true" | tee -a out/x64.release/args.gn
  46. ninja -C out/x64.release v8_monolith
  47. # produce .so files (shared libs)
  48. # temporary disable the .so files (I'm not using them for now, and they are slow to build)
  49. #sed -i.bak '/^v8_monolithic/d' out/x64.release/args.gn
  50. #echo "is_component_build = true" | tee -a out/x64.release/args.gn
  51. #ninja -C out/x64.release