diff --git a/cmake/DepsDownload.cmake b/cmake/DepsDownload.cmake index bd6a537..5d3848c 100644 --- a/cmake/DepsDownload.cmake +++ b/cmake/DepsDownload.cmake @@ -2,28 +2,27 @@ include(./cmake/DepsHelpers.cmake) # Set this to false, when using a custom v8 build for testing set(__deps_check_enabled true) +set(V8_VERSION "12.4.254") function(DownloadDeps) set(__base_path "${PROJECT_SOURCE_DIR}/deps/v8") GetBranchAndOS(__deps_branch __deps_os_path_name) - set(__deps_url_base_path "https://cdn.alt-mp.com/deps/v8/${__deps_branch}") + set(__deps_url_base_path "https://cdn.alt-mp.com/deps/v8/${V8_VERSION}") if(__deps_check_enabled) if(WIN32) message("Checking release binaries...") GetCDNInfo("${__deps_url_base_path}/${__deps_os_path_name}/Release" __deps_release_hashes __deps_current_version) - DownloadFile("v8_monolith.lib" "${__base_path}/lib/Release" "${__deps_os_path_name}/Release" ${__deps_release_hashes}) # Only download debug binary in Debug builds if(CMAKE_BUILD_TYPE STREQUAL "Debug") message("Checking debug binaries...") - GetCDNInfo("${__deps_url_base_path}/${__deps_os_path_name}/Debug" __deps_debug_hashes __deps_current_version) - - DownloadFile("v8_monolith.lib" "${__base_path}/lib/Debug" "${__deps_os_path_name}/Debug" ${__deps_debug_hashes}) + # GetCDNInfo("${__deps_url_base_path}/${__deps_os_path_name}/Debug" __deps_debug_hashes __deps_current_version) + # DownloadFile("v8_monolith.lib" "${__base_path}/lib/Debug" "${__deps_os_path_name}/Debug" ${__deps_debug_hashes}) endif() elseif(UNIX) message("Checking binaries...") @@ -33,9 +32,10 @@ function(DownloadDeps) DownloadFile("libv8_monolith.a" "${__base_path}/lib" "${__deps_os_path_name}" ${__deps_linux_hashes}) endif() - GetCDNInfo("${__deps_url_base_path}" __deps_headers_hashes __deps_current_version) - DownloadFile("headers.zip" "${__base_path}/include" "" ${__deps_headers_hashes}) - file(ARCHIVE_EXTRACT INPUT "${__base_path}/include/headers.zip" DESTINATION "${__base_path}/..") + GetCDNInfo("${__deps_url_base_path}/include" __deps_headers_hashes __deps_current_version) + DownloadFile("include.zip" "${__base_path}/include" "include" ${__deps_headers_hashes}) + file(ARCHIVE_EXTRACT INPUT "${__base_path}/include/include.zip" DESTINATION "${__base_path}/include") + file(REMOVE "${__base_path}/include/include.zip") if(__deps_current_version) message("V8 deps version: ${__deps_current_version}") diff --git a/compiler/compiler.cpp b/compiler/compiler.cpp index 8efc2e7..079eeff 100644 --- a/compiler/compiler.cpp +++ b/compiler/compiler.cpp @@ -135,7 +135,7 @@ std::vector Compiler::CreateBytecodeBuffer(const uint8_t* buffer, int l static constexpr int srcHashOffset = 8; -static constexpr uint32_t flagsHash = 243571335; +static constexpr uint32_t flagsHash = 700872405; static constexpr int flagsHashOffset = 12; void Compiler::FixBytecode(const uint8_t* buffer, int sourceLength)