Skip to content

Commit

Permalink
updating build.bat for better arch detection
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Jun 7, 2024
1 parent c119cd0 commit a336108
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/double/Edge.js/dotnetcore/coreclrembedding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ private bool TryAddAssembly(string assemblyName)
private static readonly ConcurrentDictionary<string, Tuple<Type, MethodInfo>> Compilers = new();
private static readonly IList<string> _failedAssemblyResolver = new List<string>();


public static void Initialize(IntPtr context, IntPtr exception)
{
try
Expand Down
5 changes: 3 additions & 2 deletions tools/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ if "%1" equ "" (
echo e.g. build.bat release "20.12.2"
exit /b -1
)
FOR /F "tokens=* USEBACKQ" %%F IN (`node -p process.arch`) DO (SET ARCH=%%F)

SET FLAVOR=%1
shift
Expand All @@ -27,7 +28,7 @@ if "%1" neq "" (
if "%VERSIONS%" equ "" set VERSIONS=20.14.0
pushd %SELF%\..

if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
if "%ARCH%" == "arm64" (
for %%V in (%VERSIONS%) do call :build arm64 arm64 %%V
) else (
for %%V in (%VERSIONS%) do call :build ia32 x86 %%V
Expand Down Expand Up @@ -70,7 +71,7 @@ if %ERRORLEVEL% neq 0 (
)

REM Conflict when building arm64 binaries
if "%PROCESSOR_ARCHITECTURE%" == "ARM64" (
if "%ARCH%" == "arm64" (
FOR %%F IN (build\*.vcxproj) DO (
echo Patch /fp:strict in %%F
powershell -Command "(Get-Content -Raw %%F) -replace '<FloatingPointModel>Strict</FloatingPointModel>', '<!-- <FloatingPointModel>Strict</FloatingPointModel> -->' | Out-File -Encoding Utf8 %%F"
Expand Down

0 comments on commit a336108

Please sign in to comment.