Tweak ObjectStackAllocationTests so that they work correctly under crossgen2 (#40096)
authorDavid Wrighton <davidwr@microsoft.com>
Wed, 29 Jul 2020 20:25:00 +0000 (13:25 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 20:25:00 +0000 (13:25 -0700)
commita4bd2fb7dfe5d66e0151c86678b4bbf149794772
treefb128a4edac3eaea755bcd445bf483978241fbf8
parent251a3c39689b115d07b326590982e6780a0704f7
Tweak ObjectStackAllocationTests so that they work correctly under crossgen2 (#40096)

- Add a mechanism for passing arbitrary arguments to the crossgen2 process while running crossgen2 tests
- Pass the `--codegenopt JitObjectStackAllocation=1` when compiling this test with Crossgen2. This will result in enabling the object stack allocation feature during compilation
- As Crossgen2 currently disregards the debuggable attribute when deciding codegen mode, detect the presence running crossgen2 and expect allocation to occur on the stack even if S.P.C is debuggable
src/coreclr/tests/issues.targets
src/coreclr/tests/src/CLRTest.CrossGen.targets
src/tests/JIT/opt/ObjectStackAllocation/ObjectStackAllocationTests.cs
src/tests/JIT/opt/ObjectStackAllocation/ObjectStackAllocationTests.csproj