RegenAllByteCode.cmd 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ::-------------------------------------------------------------------------------------------------------
  2. :: Copyright (C) Microsoft. All rights reserved.
  3. :: Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. ::-------------------------------------------------------------------------------------------------------
  5. :: Regenerate all bytecode.
  6. :: Note, this script is windows only, on linux or macOS please use tools/xplatRegenByteCode.py
  7. :: ch.exe is used to generate Intl bytecodes.
  8. :: ch.exe (NoJIT variety) is used to generate NoJIT Intl bytecodes.
  9. :: Each set of bytecode requires an x86_debug and x64_debug binary.
  10. ::
  11. :: Thus we need to build the following:
  12. :: [Core] ch.exe x64_debug
  13. :: [Core] ch.exe x86_debug
  14. :: [Core] ch.exe x64_debug (NoJIT)
  15. :: [Core] ch.exe x86_debug (NoJIT)
  16. setlocal
  17. pushd %~dp0
  18. :: ch.exe x64_debug
  19. :: ch.exe x86_debug
  20. call jenkins\buildone.cmd x64 debug
  21. if %errorlevel% neq 0 (
  22. echo There was a build error for x64 debug. Stopping bytecode generation.
  23. exit /b 1
  24. )
  25. call jenkins\buildone.cmd x86 debug
  26. if %errorlevel% neq 0 (
  27. echo There was a build error for x86 debug. Stopping bytecode generation.
  28. exit /b 1
  29. )
  30. pushd lib\Runtime\Library\InJavascript
  31. call GenByteCode.cmd
  32. if %errorlevel% neq 0 (
  33. echo There was an error when regenerating bytecode header.
  34. exit /b 1
  35. )
  36. popd
  37. pushd lib\Runtime\Library\JsBuiltIn
  38. call GenByteCode.cmd
  39. if %errorlevel% neq 0 (
  40. echo There was an error when regenerating bytecode header.
  41. exit /b 1
  42. )
  43. popd
  44. :: ch.exe x64_debug (NoJIT)
  45. :: ch.exe x86_debug (NoJIT)
  46. call jenkins\buildone.cmd x64 debug "/p:BuildJIT=false"
  47. if %errorlevel% neq 0 (
  48. echo There was a build error for x64 debug NoJIT. Stopping bytecode generation.
  49. exit /b 1
  50. )
  51. call jenkins\buildone.cmd x86 debug "/p:BuildJIT=false"
  52. if %errorlevel% neq 0 (
  53. echo There was a build error for x86 debug NoJIT. Stopping bytecode generation.
  54. exit /b 1
  55. )
  56. :: Generate Intl NoJIT Bytecodes using ch.exe (NoJIT)
  57. pushd lib\Runtime\Library\InJavascript
  58. call GenByteCode.cmd -nojit
  59. if %errorlevel% neq 0 (
  60. echo There was an error when regenerating bytecode header for NoJIT.
  61. exit /b 1
  62. )
  63. popd
  64. :: Generate BuiltIn NoJIT Bytecodes using ch.exe (NoJIT)
  65. pushd lib\Runtime\Library\JsBuiltIn
  66. call GenByteCode.cmd -nojit
  67. if %errorlevel% neq 0 (
  68. echo There was an error when regenerating bytecode header for NoJIT.
  69. exit /b 1
  70. )
  71. popd
  72. popd
  73. endlocal