From 0d886296f3866c50be2ea0fd53d17c98809e4993 Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Thu, 23 Mar 2017 09:31:35 -0700 Subject: [PATCH] Enable FEATURE_METADATA_EMIT_ALL for non-crossgen compiles This allows ilasm roundtrip test to work with NetStandard 2.0 changes where C# compiler emits a ".permissionset" attribute into the assembly that ildasm emits. This define enables the APIs that ilasm uses to process this attribute. Re-enable ilasm roundtrip test. Fixes dotnet/coreclr#8418 Commit migrated from https://github.com/dotnet/coreclr/commit/e4849aae67375a2dfbe73bf2bf94e4abc17464d4 --- src/coreclr/src/md/compiler/CMakeLists.txt | 1 + src/coreclr/src/md/compiler/wks/CMakeLists.txt | 4 +++- src/coreclr/src/md/enc/wks/CMakeLists.txt | 2 ++ src/coreclr/src/md/md_wks.cmake | 2 +- src/coreclr/src/md/runtime/wks/CMakeLists.txt | 2 ++ src/coreclr/src/md/winmd/wks/CMakeLists.txt | 4 +++- src/coreclr/tests/issues.targets | 3 --- src/coreclr/tests/testsFailingOutsideWindows.txt | 1 - 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/coreclr/src/md/compiler/CMakeLists.txt b/src/coreclr/src/md/compiler/CMakeLists.txt index 4d99d11..6d46dc0 100644 --- a/src/coreclr/src/md/compiler/CMakeLists.txt +++ b/src/coreclr/src/md/compiler/CMakeLists.txt @@ -11,6 +11,7 @@ set(MDCOMPILER_SOURCES import.cpp importhelper.cpp mdutil.cpp + newmerger.cpp regmeta.cpp regmeta_compilersupport.cpp regmeta_emit.cpp diff --git a/src/coreclr/src/md/compiler/wks/CMakeLists.txt b/src/coreclr/src/md/compiler/wks/CMakeLists.txt index 6bf6c80..eb39ca7 100644 --- a/src/coreclr/src/md/compiler/wks/CMakeLists.txt +++ b/src/coreclr/src/md/compiler/wks/CMakeLists.txt @@ -1,4 +1,6 @@ include(../../md_wks.cmake) +add_definitions(-DFEATURE_METADATA_EMIT_ALL) + add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES) -add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES}) \ No newline at end of file +add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES}) diff --git a/src/coreclr/src/md/enc/wks/CMakeLists.txt b/src/coreclr/src/md/enc/wks/CMakeLists.txt index df76641..2c0a2b1 100644 --- a/src/coreclr/src/md/enc/wks/CMakeLists.txt +++ b/src/coreclr/src/md/enc/wks/CMakeLists.txt @@ -1,4 +1,6 @@ include(../../md_wks.cmake) +add_definitions(-DFEATURE_METADATA_EMIT_ALL) + add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES) add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES}) diff --git a/src/coreclr/src/md/md_wks.cmake b/src/coreclr/src/md/md_wks.cmake index ab9df6c..4d72c55 100644 --- a/src/coreclr/src/md/md_wks.cmake +++ b/src/coreclr/src/md/md_wks.cmake @@ -3,4 +3,4 @@ add_definitions(-DFEATURE_METADATA_INTERNAL_APIS) add_definitions(-DFEATURE_METADATA_IN_VM) if(WIN32) add_definitions(-DFEATURE_METADATA_VERIFY_LAYOUTS) -endif(WIN32) \ No newline at end of file +endif(WIN32) diff --git a/src/coreclr/src/md/runtime/wks/CMakeLists.txt b/src/coreclr/src/md/runtime/wks/CMakeLists.txt index 9a1f72e..3e2a8cc 100644 --- a/src/coreclr/src/md/runtime/wks/CMakeLists.txt +++ b/src/coreclr/src/md/runtime/wks/CMakeLists.txt @@ -1,5 +1,7 @@ include(../../md_wks.cmake) +add_definitions(-DFEATURE_METADATA_EMIT_ALL) + add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES) add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES}) diff --git a/src/coreclr/src/md/winmd/wks/CMakeLists.txt b/src/coreclr/src/md/winmd/wks/CMakeLists.txt index 139b68b..defcc1d 100644 --- a/src/coreclr/src/md/winmd/wks/CMakeLists.txt +++ b/src/coreclr/src/md/winmd/wks/CMakeLists.txt @@ -1,4 +1,6 @@ include(../../md_wks.cmake) +add_definitions(-DFEATURE_METADATA_EMIT_ALL) + add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES) -add_library_clr(mdwinmd_wks ${MDWINMD_SOURCES}) \ No newline at end of file +add_library_clr(mdwinmd_wks ${MDWINMD_SOURCES}) diff --git a/src/coreclr/tests/issues.targets b/src/coreclr/tests/issues.targets index db0577d..05a66d6 100644 --- a/src/coreclr/tests/issues.targets +++ b/src/coreclr/tests/issues.targets @@ -184,9 +184,6 @@ 6707 - - 8418 - diff --git a/src/coreclr/tests/testsFailingOutsideWindows.txt b/src/coreclr/tests/testsFailingOutsideWindows.txt index de94b28..809433c 100644 --- a/src/coreclr/tests/testsFailingOutsideWindows.txt +++ b/src/coreclr/tests/testsFailingOutsideWindows.txt @@ -78,4 +78,3 @@ Loader/classloader/TypeGeneratorTests/TypeGeneratorTest614/Generated614/Generate Loader/classloader/TypeGeneratorTests/TypeGeneratorTest681/Generated681/Generated681.sh Loader/classloader/TypeGeneratorTests/TypeGeneratorTest682/Generated682/Generated682.sh Loader/classloader/TypeGeneratorTests/TypeGeneratorTest683/Generated683/Generated683.sh -JIT/opt/perf/doublealign/Locals/Locals.sh -- 2.7.4