From aa9c2fc2a2870667f53064e91dd24b248ab554a4 Mon Sep 17 00:00:00 2001 From: TIHan Date: Mon, 7 Aug 2023 13:01:19 -0700 Subject: [PATCH 1/8] Create IL-RT folder to store round-tripped IL assemblies and sources --- src/tests/Common/CLRTest.Jit.targets | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index aa48396d19fe11..2e91d9733f9b61 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -43,8 +43,8 @@ WARNING: When setting properties based on their current state (for example: - $(AssemblyName).dasm.il - $(AssemblyName).asm.dll + IL-RT/$(AssemblyName).dasm.il + IL-RT/$(AssemblyName).asm.dll - $(AssemblyName).dasm.il - $(AssemblyName).asm.dll + IL-RT\$(AssemblyName).dasm.il + IL-RT\$(AssemblyName).asm.dll Date: Mon, 7 Aug 2023 13:44:28 -0700 Subject: [PATCH 2/8] Re-enable 'rejit' for roundtrip testing. Remove .asm.dll. --- src/tests/Common/CLRTest.Jit.targets | 8 ++++---- src/tests/profiler/rejit/rejit.csproj | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 2e91d9733f9b61..0cd2c2c2e65c29 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -43,8 +43,8 @@ WARNING: When setting properties based on their current state (for example: - IL-RT/$(AssemblyName).dasm.il - IL-RT/$(AssemblyName).asm.dll + IL-RT/$(AssemblyName).il + IL-RT/$(AssemblyName).dll - IL-RT\$(AssemblyName).dasm.il - IL-RT\$(AssemblyName).asm.dll + IL-RT\$(AssemblyName).il + IL-RT\$(AssemblyName).dll true - - true From 72a087a6d4b91850b1be73b63b7e2058f49ed8df Mon Sep 17 00:00:00 2001 From: TIHan Date: Tue, 8 Aug 2023 18:34:53 -0700 Subject: [PATCH 3/8] Copy dlls to folder --- eng/pipelines/coreclr/ilasm.yml | 1 + src/tests/Common/CLRTest.Jit.targets | 2 ++ 2 files changed, 3 insertions(+) diff --git a/eng/pipelines/coreclr/ilasm.yml b/eng/pipelines/coreclr/ilasm.yml index da80300676d47b..e1ba4c663ad566 100644 --- a/eng/pipelines/coreclr/ilasm.yml +++ b/eng/pipelines/coreclr/ilasm.yml @@ -68,3 +68,4 @@ extends: jobParameters: testGroup: ilasm liveLibrariesBuildConfig: Release + diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 0cd2c2c2e65c29..4e82520cb8c1ea 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -63,6 +63,7 @@ export RunningIlasmRoundTrip= if [ -z "$DoLink" -a ! -z "$RunningIlasmRoundTrip" ]; then mkdir IL-RT + cp *.dll IL-RT/ echo "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) ERRORLEVEL=$? @@ -146,6 +147,7 @@ REM Todo: Ilasm round-trip on linked binaries. IF NOT DEFINED DoLink ( IF DEFINED RunningIlasmRoundTrip ( mkdir IL-RT + copy *.dll IL-RT\ ECHO %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) From 0325c47ea118d4670e9cf46ea6f07d361aa5618d Mon Sep 17 00:00:00 2001 From: Will Smith Date: Tue, 3 Oct 2023 14:51:13 -0700 Subject: [PATCH 4/8] Update ilasm.yml --- eng/pipelines/coreclr/ilasm.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/coreclr/ilasm.yml b/eng/pipelines/coreclr/ilasm.yml index e1ba4c663ad566..da80300676d47b 100644 --- a/eng/pipelines/coreclr/ilasm.yml +++ b/eng/pipelines/coreclr/ilasm.yml @@ -68,4 +68,3 @@ extends: jobParameters: testGroup: ilasm liveLibrariesBuildConfig: Release - From 9cde040249f19eb8aea019a666c3dfab092f68dc Mon Sep 17 00:00:00 2001 From: Will Smith Date: Tue, 3 Oct 2023 17:28:21 -0700 Subject: [PATCH 5/8] Update CLRTest.Jit.targets --- src/tests/Common/CLRTest.Jit.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 4e82520cb8c1ea..1dde644e32df2e 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -63,7 +63,7 @@ export RunningIlasmRoundTrip= if [ -z "$DoLink" -a ! -z "$RunningIlasmRoundTrip" ]; then mkdir IL-RT - cp *.dll IL-RT/ + cp *.* IL-RT/ echo "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) ERRORLEVEL=$? @@ -147,7 +147,7 @@ REM Todo: Ilasm round-trip on linked binaries. IF NOT DEFINED DoLink ( IF DEFINED RunningIlasmRoundTrip ( mkdir IL-RT - copy *.dll IL-RT\ + copy *.* IL-RT\ ECHO %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) From c76d06cca6de4e2dc8ee98b07f614516929d58e9 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Wed, 4 Oct 2023 13:01:12 -0700 Subject: [PATCH 6/8] Update CLRTest.Jit.targets --- src/tests/Common/CLRTest.Jit.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 1dde644e32df2e..73e14880ce8cd8 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -63,7 +63,7 @@ export RunningIlasmRoundTrip= if [ -z "$DoLink" -a ! -z "$RunningIlasmRoundTrip" ]; then mkdir IL-RT - cp *.* IL-RT/ + cp -R *.* IL-RT/ echo "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) ERRORLEVEL=$? @@ -147,7 +147,7 @@ REM Todo: Ilasm round-trip on linked binaries. IF NOT DEFINED DoLink ( IF DEFINED RunningIlasmRoundTrip ( mkdir IL-RT - copy *.* IL-RT\ + xcopy /E *.* IL-RT\ ECHO %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) %CORE_ROOT%\ildasm.exe /raweh /unicode /out=$(DisassemblyName) $(InputAssemblyName) From dbf002e57354c1702c20e63bb7ce2f22ec8227ca Mon Sep 17 00:00:00 2001 From: Will Smith Date: Wed, 4 Oct 2023 15:43:39 -0700 Subject: [PATCH 7/8] Update CLRTest.Jit.targets --- src/tests/Common/CLRTest.Jit.targets | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 73e14880ce8cd8..02f90d6963e06f 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -63,9 +63,9 @@ export RunningIlasmRoundTrip= if [ -z "$DoLink" -a ! -z "$RunningIlasmRoundTrip" ]; then mkdir IL-RT - cp -R *.* IL-RT/ - echo "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) - "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(InputAssemblyName) + cp $(InputAssemblyName) $(TargetAssemblyName) + echo "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(TargetAssemblyName) + "$CORE_ROOT/ildasm" -raweh -unicode -out=$(DisassemblyName) $(TargetAssemblyName) ERRORLEVEL=$? if [ $ERRORLEVEL -ne 0 ] then @@ -81,8 +81,8 @@ then ilasm_count=1 while true do - echo "$CORE_ROOT/ilasm" -output=$(TargetAssemblyName) $(_IlasmSwitches) $(DisassemblyName) - "$CORE_ROOT/ilasm" -output=$(TargetAssemblyName) $(_IlasmSwitches) $(DisassemblyName) + echo "$CORE_ROOT/ilasm" -output=$(InputAssemblyName) $(_IlasmSwitches) $(DisassemblyName) + "$CORE_ROOT/ilasm" -output=$(InputAssemblyName) $(_IlasmSwitches) $(DisassemblyName) ERRORLEVEL=$? if [ $ERRORLEVEL -eq 0 ] then @@ -111,8 +111,8 @@ fi Date: Wed, 4 Oct 2023 15:45:30 -0700 Subject: [PATCH 8/8] Update CLRTest.Jit.targets --- src/tests/Common/CLRTest.Jit.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/Common/CLRTest.Jit.targets b/src/tests/Common/CLRTest.Jit.targets index 02f90d6963e06f..9748b6424f7374 100644 --- a/src/tests/Common/CLRTest.Jit.targets +++ b/src/tests/Common/CLRTest.Jit.targets @@ -182,8 +182,8 @@ IF NOT DEFINED DoLink (