@@ -67,6 +67,12 @@ $replaceWhat = 'MapHandlesSpan(possible_transition_targets.begin(),'
6767$replaceWith = ' possible_transition_targets.empty() ? MapHandlesSpan() : MapHandlesSpan(possible_transition_targets.begin(),'
6868(Get-Content $filePath ).Replace($replaceWhat , $replaceWith ) | Set-Content $filePath
6969
70+ # Fix std::function -> base::FunctionRef incompatibility in backing-store.cc on newer V8/Clang builds
71+ $filePath = " ${MOUNT_TARGET_DRIVE} :\v8\src\objects\backing-store.cc"
72+ $replaceWhat = ' auto gc_retry = [&](const std::function<bool()>& fn) {'
73+ $replaceWith = ' auto gc_retry = [&](base::FunctionRef<bool()> fn) {'
74+ (Get-Content $filePath ).Replace($replaceWhat , $replaceWith ) | Set-Content $filePath
75+
7076# ###################################
7177# #
7278# Tricks and hacks zone end #
@@ -83,5 +89,20 @@ New-Item -ItemType Directory -Force -Path "${MOUNT_TARGET_DRIVE}:\build_results"
8389Copy-Item - Path " ${MOUNT_TARGET_DRIVE} :\v8\out.gn\x64.debug\obj\v8_monolith.lib" - Destination " ${MOUNT_TARGET_DRIVE} :\build_results\v8_monolithd.lib"
8490Copy-Item - Path " ${MOUNT_TARGET_DRIVE} :\v8\out.gn\x64.release\obj\v8_monolith.lib" - Destination " ${MOUNT_TARGET_DRIVE} :\build_results\v8_monolith.lib"
8591
92+ $PACKAGE_ROOT = " ${MOUNT_TARGET_DRIVE} :\build_results\v8-package"
93+ $PACKAGE_LIBS_DIR = " $PACKAGE_ROOT \libs"
94+ $PACKAGE_INCLUDE_DIR = " $PACKAGE_ROOT \include\v8"
95+ $PACKAGE_ARCHIVE = " ${MOUNT_TARGET_DRIVE} :\build_results\v8.tar.xz"
96+
97+ Remove-Item - Path $PACKAGE_ROOT - Recurse - Force - ErrorAction SilentlyContinue
98+ Remove-Item - Path $PACKAGE_ARCHIVE - Force - ErrorAction SilentlyContinue
99+ New-Item - ItemType Directory - Force - Path $PACKAGE_LIBS_DIR
100+ New-Item - ItemType Directory - Force - Path $PACKAGE_INCLUDE_DIR
101+ Copy-Item - Path " ${MOUNT_TARGET_DRIVE} :\build_results\v8_monolithd.lib" - Destination $PACKAGE_LIBS_DIR
102+ Copy-Item - Path " ${MOUNT_TARGET_DRIVE} :\build_results\v8_monolith.lib" - Destination $PACKAGE_LIBS_DIR
103+ Copy-Item - Path " ${MOUNT_TARGET_DRIVE} :\v8\include\*" - Destination $PACKAGE_INCLUDE_DIR - Recurse - Force
104+ tar.exe - cJf $PACKAGE_ARCHIVE - C $PACKAGE_ROOT .
105+ Remove-Item - Path $PACKAGE_ROOT - Recurse - Force
106+
86107# Attempt to clean up and remove X: mapping at the end; ignore errors
87108Invoke-Expression " subst ${MOUNT_TARGET_DRIVE} : /D" - ErrorAction SilentlyContinue
0 commit comments