summaryrefslogtreecommitdiff
path: root/clrdefinitions.cmake
diff options
context:
space:
mode:
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>2017-12-05 11:37:43 +0100
committerGitHub <noreply@github.com>2017-12-05 11:37:43 +0100
commit809b8f792923c95b9d5fee824c60dde21079cca1 (patch)
tree9aeced1d4c0ba6ef4598fae401526afec17be324 /clrdefinitions.cmake
parentd714acda701d78a572b3fe36f33abcaf7e26c2df (diff)
downloadcoreclr-809b8f792923c95b9d5fee824c60dde21079cca1.tar.gz
coreclr-809b8f792923c95b9d5fee824c60dde21079cca1.tar.bz2
coreclr-809b8f792923c95b9d5fee824c60dde21079cca1.zip
Put default interfaces behind a define (#15358)
This is needed so that we can turn default interfaces off in release branches. I can't find a central location where the PRERELEASE flag could be defined because native and managed builds seem to be completely disconnected. To limit the risk of only flipping the flag in one build type, I'm adding a test that verifies being able to load an interface with default methods matches what RuntimeFeature says.
Diffstat (limited to 'clrdefinitions.cmake')
-rw-r--r--clrdefinitions.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/clrdefinitions.cmake b/clrdefinitions.cmake
index 2ab424f949..5e12ca1e05 100644
--- a/clrdefinitions.cmake
+++ b/clrdefinitions.cmake
@@ -1,5 +1,14 @@
include(clrfeatures.cmake)
+# If set, indicates that this is not an officially supported release
+# Keep in sync with IsPrerelease in dir.props
+set(PRERELEASE 1)
+
+# Features we're currently flighting, but don't intend to ship in officially supported releases
+if (PRERELEASE)
+ add_definitions(-DFEATURE_DEFAULT_INTERFACES=1)
+endif (PRERELEASE)
+
if (CLR_CMAKE_TARGET_ARCH_AMD64)
if (CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DDBG_TARGET_AMD64_UNIX)