Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

86 lines
3.6KB

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